Toggle navigation
Toggle navigation
This project
Loading...
Sign in
장연우
/
WELLO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
soonmyeong2
2019-11-10 00:13:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
da69bebb5890b2a4b1fe18db5459d02b8e905b20
da69bebb
1 parent
742cf625
change bottom_navigation_view in detailview
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
37 deletions
vip/app/src/main/java/com/example/vip/DetailActivity.kt
vip/app/src/main/java/com/example/vip/MainActivity.kt
vip/app/src/main/res/layout/activity_detail.xml
vip/app/src/main/res/menu/detailpage_navigation.xml
vip/app/src/main/java/com/example/vip/DetailActivity.kt
View file @
da69beb
...
...
@@ -27,6 +27,11 @@ import kotlinx.android.synthetic.main.activity_recommend.*
import
kotlinx.android.synthetic.main.activity_signin.*
import
kotlinx.android.synthetic.main.activity_signin.toolbar
import
kotlinx.android.synthetic.main.search.*
import
androidx.core.app.ComponentActivity.ExtraData
import
androidx.core.content.ContextCompat.getSystemService
import
android.icu.lang.UCharacter.GraphemeClusterBreak.T
import
android.net.Uri
data class
MemoItemDetail
(
val
Target
:
String
=
""
,
...
...
@@ -74,6 +79,32 @@ class DetailActivity : AppCompatActivity() {
val
web
:
WebView
=
findViewById
(
R
.
id
.
policy_context
)
val
summary
:
String
=
memo
!!
.
Content
web
.
loadData
(
summary
,
"text/html"
,
"UTF-8"
)
val
mOnNavigationItemSelectedListener
=
BottomNavigationView
.
OnNavigationItemSelectedListener
{
item
->
when
(
item
.
itemId
){
R
.
id
.
shareBtn
->{
//val intent = Intent(this, SignInActivity::class.java)
//startActivity(intent)
//return@OnNavigationItemSelectedListener true
}
R
.
id
.
favorBtn
->{
}
R
.
id
.
linkBtn
->{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
memo
.
Link
))
startActivity
(
intent
)
}
}
false
}
////bottom navigation view operation start 2
bottomBar
=
supportActionBar
!!
val
bottomNavigation
:
BottomNavigationView
=
findViewById
(
R
.
id
.
bottomNavigation
)
bottomNavigation
.
setOnNavigationItemSelectedListener
(
mOnNavigationItemSelectedListener
)
////bottom navigation view operation end 2
}
}
})
...
...
@@ -84,7 +115,6 @@ class DetailActivity : AppCompatActivity() {
}
// 1. 툴바 사용 설정
setSupportActionBar
(
toolbar
)
...
...
@@ -93,11 +123,6 @@ class DetailActivity : AppCompatActivity() {
supportActionBar
!!
.
setHomeAsUpIndicator
(
R
.
drawable
.
return_page
)
// 왼쪽 버튼 아이콘 설정
supportActionBar
!!
.
setDisplayShowTitleEnabled
(
false
)
// 타이틀 안보이게 하기
////bottom navigation view operation start 2
bottomBar
=
supportActionBar
!!
val
bottomNavigation
:
BottomNavigationView
=
findViewById
(
R
.
id
.
bottomNavigation
)
bottomNavigation
.
setOnNavigationItemSelectedListener
(
mOnNavigationItemSelectedListener
)
////bottom navigation view operation end 2
}
// 3.툴바 메뉴 버튼을 설정
...
...
@@ -123,34 +148,7 @@ class DetailActivity : AppCompatActivity() {
}
//bottom navigation view operation start 3
private
val
mOnNavigationItemSelectedListener
=
BottomNavigationView
.
OnNavigationItemSelectedListener
{
item
->
when
(
item
.
itemId
){
R
.
id
.
bottomHome
->{
val
intent
=
Intent
(
this
,
SignInActivity
::
class
.
java
)
startActivity
(
intent
)
return
@OnNavigationItemSelectedListener
true
}
R
.
id
.
bottomRecommend
->{
val
intent
=
Intent
(
this
,
RecommendActivity
::
class
.
java
)
startActivity
(
intent
)
return
@OnNavigationItemSelectedListener
true
}
R
.
id
.
bottomFavorites
->{
val
intent
=
Intent
(
this
,
FavoritesActivity
::
class
.
java
)
startActivity
(
intent
)
return
@OnNavigationItemSelectedListener
true
}
R
.
id
.
bottomInfo
->{
val
intent
=
Intent
(
this
,
InfoActivity
::
class
.
java
)
startActivity
(
intent
)
return
@OnNavigationItemSelectedListener
true
}
}
false
}
//bottom navigation view operation end 3
}
...
...
vip/app/src/main/java/com/example/vip/MainActivity.kt
View file @
da69beb
...
...
@@ -43,9 +43,6 @@ class MainActivity : AppCompatActivity() {
startActivity
(
intent
)
}
}
private
fun
loginEmail
(){
...
...
vip/app/src/main/res/layout/activity_detail.xml
View file @
da69beb
...
...
@@ -111,7 +111,7 @@
app:itemIconTint=
"#29ABE2"
app:itemTextColor=
"#29ABE2"
app:labelVisibilityMode=
"labeled"
app:menu=
"@menu/
bottom_nav_menu
"
/>
app:menu=
"@menu/
detailpage_navigation
"
/>
</FrameLayout>
</LinearLayout>
...
...
vip/app/src/main/res/menu/detailpage_navigation.xml
0 → 100644
View file @
da69beb
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/shareBtn"
android:enabled=
"true"
android:icon=
"@drawable/home"
android:title=
"Share"
app:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/favorBtn"
android:enabled=
"true"
android:icon=
"@drawable/wish"
android:title=
"Heart"
app:showAsAction=
"ifRoom"
/>
<item
android:id=
"@+id/linkBtn"
android:enabled=
"true"
android:icon=
"@drawable/instagram"
android:title=
"Link"
app:showAsAction=
"ifRoom"
/>
</menu>
\ No newline at end of file
Please
register
or
login
to post a comment