AccountSettingActivity.kt
3.21 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
62
63
64
65
66
67
package com.example.vip
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.google.android.material.bottomnavigation.BottomNavigationView
import kotlinx.android.synthetic.main.activity_account_settings.*
class AccountSettingActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_account_settings)
val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_account_setting) as BottomNavigationView
bottomNavigationView.selectedItemId = R.id.bottomInfo
bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
/*
val prof: SharedPreferences = getSharedPreferences("policy_key", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
input_db.setOnClickListener{
editor.putString("0", "[신한금융그룹] 신한 희망사회프로젝트 위기가정 재기지원사업 2년차 사업(2019년 5월~2020년 4월)")
editor.putString("1", "2020년 동계 아름드리 대학생 해외봉사단원 모집")
editor.putString("2", "초록우산 어린이재단 인재양성사업 - 2020 아이리더 모집공고")
editor.putString("3", "(열매나눔복지재단, 처갓집양념치킨)2019 저소득가구 창업지원사업 처갓집양념치킨 창업자 모집공고(5.31-)")
editor.putString("4", "[2017년도] 예비부부교실 / 신혼부부교실 : 연간일정")
editor.putString("5", "신생아지원")
editor.putString("6", "성폭력피해아동청소년 전용쉼터운영지원")
editor.putString("7", "국가유공자등취업지원")
editor.putString("8", "결혼이민자 통번역 서비스")
editor.putString("9", "한부모가족자녀 교육비 지원")
editor.commit()
}
*/
}
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
}
}