SettingsInForm.kt
2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.wello.vip
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.google.android.material.bottomnavigation.BottomNavigationView
import kotlinx.android.synthetic.main.activity_settings_in_form.*
class SettingsInForm : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_settings_in_form)
val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_setting) as BottomNavigationView
bottomNavigationView.selectedItemId = R.id.bottomInfo
bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
accountBtn.setOnClickListener {
var intent = Intent(this, AccountSettingActivity::class.java)
startActivity(intent)
}
info_push.setOnClickListener {
var intent = Intent(this, PushInfoActivity::class.java)
startActivity(intent)
// 설정 눌렀을 때
}
terms_of_use.setOnClickListener{
var intent = Intent(this, TermsOfUserActivity::class.java)
startActivity(intent)
}
}
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
}
}