soonmyeong2

add view Counter

No preview for this file type
This diff is collapsed. Click to expand it.
...@@ -20,8 +20,9 @@ ...@@ -20,8 +20,9 @@
20 "Category15": "1", 20 "Category15": "1",
21 "Category16": "1", 21 "Category16": "1",
22 "Keyword": "위기가정 재기지원사업, 신한금융그룹, 사회복지공동모금회, 굿네이버스, 빈곤가정 지원사업, 신한금융그룹, 사회복지공동모금회, 굿네이버스", 22 "Keyword": "위기가정 재기지원사업, 신한금융그룹, 사회복지공동모금회, 굿네이버스, 빈곤가정 지원사업, 신한금융그룹, 사회복지공동모금회, 굿네이버스",
23 - "Date": "D-164", 23 + "Date": "2019.05.01(수)~2020.04.30(목)",
24 - "View": 0 24 + "View": 0,
25 + "D_day": "D-164"
25 },{ 26 },{
26 "Value": "1", 27 "Value": "1",
27 "Policy": "2020년 동계 아름드리 대학생 해외봉사단원 모집", 28 "Policy": "2020년 동계 아름드리 대학생 해외봉사단원 모집",
...@@ -44,8 +45,9 @@ ...@@ -44,8 +45,9 @@
44 "Category15": "1", 45 "Category15": "1",
45 "Category16": "1", 46 "Category16": "1",
46 "Keyword": "KT&G복지재단, 동계 아름드리, 대학생 해외봉사단원 모집, 캄보디아, KT&G복지재단", 47 "Keyword": "KT&G복지재단, 동계 아름드리, 대학생 해외봉사단원 모집, 캄보디아, KT&G복지재단",
47 - "Date": "종료", 48 + "Date": "2019.09.09(월)~2019.10.01(화)",
48 - "View": 0 49 + "View": 0,
50 + "D_day": "종료"
49 },{ 51 },{
50 "Value": "2", 52 "Value": "2",
51 "Policy": "초록우산 어린이재단 인재양성사업 - 2020 아이리더 모집공고", 53 "Policy": "초록우산 어린이재단 인재양성사업 - 2020 아이리더 모집공고",
...@@ -68,8 +70,9 @@ ...@@ -68,8 +70,9 @@
68 "Category15": "1", 70 "Category15": "1",
69 "Category16": "1", 71 "Category16": "1",
70 "Keyword": "초록우산어린이재단, 인재양성사업, 2020 아이리더, 모집공고, 국민기초생활수급권자, 저소득 아동, 초록우산어린이재단", 72 "Keyword": "초록우산어린이재단, 인재양성사업, 2020 아이리더, 모집공고, 국민기초생활수급권자, 저소득 아동, 초록우산어린이재단",
71 - "Date": "종료", 73 + "Date": "2019.10.01(화)~2019.10.31(목)",
72 - "View": 0 74 + "View": 0,
75 + "D_day": "종료"
73 },{ 76 },{
74 "Value": "3", 77 "Value": "3",
75 "Policy": "(열매나눔복지재단, 처갓집양념치킨)2019 저소득가구 창업지원사업 처갓집양념치킨 창업자 모집공고(5.31-)", 78 "Policy": "(열매나눔복지재단, 처갓집양념치킨)2019 저소득가구 창업지원사업 처갓집양념치킨 창업자 모집공고(5.31-)",
...@@ -92,8 +95,9 @@ ...@@ -92,8 +95,9 @@
92 "Category15": "1", 95 "Category15": "1",
93 "Category16": "1", 96 "Category16": "1",
94 "Keyword": "열매나눔복지재단, 처갓집양념치킨, 저소득가구 창업지원사업, 처갓집양념치킨 창업, 열매나눔복지재단, 처갓집양념치킨", 97 "Keyword": "열매나눔복지재단, 처갓집양념치킨, 저소득가구 창업지원사업, 처갓집양념치킨 창업, 열매나눔복지재단, 처갓집양념치킨",
95 - "Date": "D-43", 98 + "Date": "2019.05.31(금)~2019.12.31(화)",
96 - "View": 0 99 + "View": 0,
100 + "D_day": "D-43"
97 },{ 101 },{
98 "Value": "4", 102 "Value": "4",
99 "Policy": "[2017년도] 예비부부교실 / 신혼부부교실 : 연간일정", 103 "Policy": "[2017년도] 예비부부교실 / 신혼부부교실 : 연간일정",
...@@ -116,8 +120,9 @@ ...@@ -116,8 +120,9 @@
116 "Category15": "1", 120 "Category15": "1",
117 "Category16": "1", 121 "Category16": "1",
118 "Keyword": "예비부부, 신혼부부", 122 "Keyword": "예비부부, 신혼부부",
119 - "Date": "상시", 123 + "Date": "",
120 - "View": 0 124 + "View": 0,
125 + "D_day": "상시"
121 },{ 126 },{
122 "Value": "5", 127 "Value": "5",
123 "Policy": "신생아지원", 128 "Policy": "신생아지원",
...@@ -140,8 +145,9 @@ ...@@ -140,8 +145,9 @@
140 "Category15": "1", 145 "Category15": "1",
141 "Category16": "1", 146 "Category16": "1",
142 "Keyword": "['지원', '건강', '선천성', '관리', '의료', '강동구', '증진', '신생아', '이상']", 147 "Keyword": "['지원', '건강', '선천성', '관리', '의료', '강동구', '증진', '신생아', '이상']",
143 - "Date": "상시", 148 + "Date": "",
144 - "View": 0 149 + "View": 0,
150 + "D_day": "상시"
145 },{ 151 },{
146 "Value": "6", 152 "Value": "6",
147 "Policy": "성폭력피해아동청소년 전용쉼터운영지원", 153 "Policy": "성폭력피해아동청소년 전용쉼터운영지원",
...@@ -164,8 +170,9 @@ ...@@ -164,8 +170,9 @@
164 "Category15": "1", 170 "Category15": "1",
165 "Category16": "1", 171 "Category16": "1",
166 "Keyword": "여성가족부, 권익지원과", 172 "Keyword": "여성가족부, 권익지원과",
167 - "Date": "진행중", 173 + "Date": "2019-03-21~",
168 - "View": 0 174 + "View": 0,
175 + "D_day": "진행중"
169 },{ 176 },{
170 "Value": "7", 177 "Value": "7",
171 "Policy": "국가유공자등취업지원", 178 "Policy": "국가유공자등취업지원",
...@@ -188,8 +195,9 @@ ...@@ -188,8 +195,9 @@
188 "Category15": "1", 195 "Category15": "1",
189 "Category16": "1", 196 "Category16": "1",
190 "Keyword": "국가보훈처, 생활안전과", 197 "Keyword": "국가보훈처, 생활안전과",
191 - "Date": "진행중", 198 + "Date": "2019-03-21~",
192 - "View": 0 199 + "View": 0,
200 + "D_day": "진행중"
193 },{ 201 },{
194 "Value": "8", 202 "Value": "8",
195 "Policy": "결혼이민자 통번역 서비스", 203 "Policy": "결혼이민자 통번역 서비스",
...@@ -212,8 +220,9 @@ ...@@ -212,8 +220,9 @@
212 "Category15": "1", 220 "Category15": "1",
213 "Category16": "1", 221 "Category16": "1",
214 "Keyword": "여성가족부, 다문화가족과", 222 "Keyword": "여성가족부, 다문화가족과",
215 - "Date": "진행중", 223 + "Date": "2019-02-18~",
216 - "View": 0 224 + "View": 0,
225 + "D_day": "진행중"
217 },{ 226 },{
218 "Value": "9", 227 "Value": "9",
219 "Policy": "한부모가족자녀 교육비 지원", 228 "Policy": "한부모가족자녀 교육비 지원",
...@@ -236,6 +245,7 @@ ...@@ -236,6 +245,7 @@
236 "Category15": "1", 245 "Category15": "1",
237 "Category16": "1", 246 "Category16": "1",
238 "Keyword": "교육부, 교육복지정책과", 247 "Keyword": "교육부, 교육복지정책과",
239 - "Date": "진행중", 248 + "Date": "2019-03-12~",
240 - "View": 0 249 + "View": 0,
250 + "D_day": "진행중"
241 }] 251 }]
...\ No newline at end of file ...\ No newline at end of file
......
This diff could not be displayed because it is too large.
1 package com.example.vip 1 package com.example.vip
2 2
3 import android.content.Context 3 import android.content.Context
4 +import android.content.Intent
4 import android.content.SharedPreferences 5 import android.content.SharedPreferences
5 import android.os.Bundle 6 import android.os.Bundle
6 import androidx.appcompat.app.AppCompatActivity 7 import androidx.appcompat.app.AppCompatActivity
8 +import com.google.android.material.bottomnavigation.BottomNavigationView
7 import kotlinx.android.synthetic.main.activity_account_settings.* 9 import kotlinx.android.synthetic.main.activity_account_settings.*
8 10
9 class AccountSettingActivity : AppCompatActivity() { 11 class AccountSettingActivity : AppCompatActivity() {
...@@ -11,6 +13,11 @@ class AccountSettingActivity : AppCompatActivity() { ...@@ -11,6 +13,11 @@ class AccountSettingActivity : AppCompatActivity() {
11 super.onCreate(savedInstanceState) 13 super.onCreate(savedInstanceState)
12 setContentView(R.layout.activity_account_settings) 14 setContentView(R.layout.activity_account_settings)
13 15
16 +
17 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_account_setting) as BottomNavigationView
18 + bottomNavigationView.selectedItemId = R.id.bottomInfo
19 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
20 +
14 /* 21 /*
15 val prof: SharedPreferences = getSharedPreferences("policy_key", Context.MODE_PRIVATE) 22 val prof: SharedPreferences = getSharedPreferences("policy_key", Context.MODE_PRIVATE)
16 val editor: SharedPreferences.Editor=prof.edit() 23 val editor: SharedPreferences.Editor=prof.edit()
...@@ -31,4 +38,30 @@ class AccountSettingActivity : AppCompatActivity() { ...@@ -31,4 +38,30 @@ class AccountSettingActivity : AppCompatActivity() {
31 38
32 */ 39 */
33 } 40 }
41 + private val mOnNavigationItemSelectedListener=
42 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
43 + when (item.itemId){
44 + R.id.bottomHome ->{
45 + val intent = Intent(this, SignInActivity::class.java)
46 + startActivity(intent)
47 + return@OnNavigationItemSelectedListener true
48 + }
49 + R.id.bottomRecommend ->{
50 + val intent = Intent(this, RecommendActivity::class.java)
51 + startActivity(intent)
52 + return@OnNavigationItemSelectedListener true
53 + }
54 + R.id.bottomFavorites ->{
55 + val intent = Intent(this, FavoritesActivity::class.java)
56 + startActivity(intent)
57 + return@OnNavigationItemSelectedListener true
58 + }
59 + R.id.bottomInfo ->{
60 + val intent = Intent(this, InfoActivity::class.java)
61 + startActivity(intent)
62 + return@OnNavigationItemSelectedListener true
63 + }
64 + }
65 + false
66 + }
34 } 67 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -47,7 +47,9 @@ data class MemoItemFavor( ...@@ -47,7 +47,9 @@ data class MemoItemFavor(
47 val Category13 : String = "", 47 val Category13 : String = "",
48 val Category14 : String = "", 48 val Category14 : String = "",
49 val Category15 : String = "", 49 val Category15 : String = "",
50 - val Category16 : String = "" 50 + val Category16 : String = "",
51 + val Value : String = "",
52 + val D_day : String = ""
51 ) 53 )
52 54
53 class FavoritesActivity : AppCompatActivity() { 55 class FavoritesActivity : AppCompatActivity() {
...@@ -113,7 +115,9 @@ class FavoritesActivity : AppCompatActivity() { ...@@ -113,7 +115,9 @@ class FavoritesActivity : AppCompatActivity() {
113 memo.Category13, 115 memo.Category13,
114 memo.Category14, 116 memo.Category14,
115 memo.Category15, 117 memo.Category15,
116 - memo.Category16 118 + memo.Category16,
119 + memo.Value,
120 + memo.D_day
117 ) 121 )
118 ) 122 )
119 } 123 }
......
...@@ -3,6 +3,7 @@ package com.example.vip ...@@ -3,6 +3,7 @@ package com.example.vip
3 import android.content.Intent 3 import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 +import com.google.android.material.bottomnavigation.BottomNavigationView
6 import kotlinx.android.synthetic.main.activity_notice.* 7 import kotlinx.android.synthetic.main.activity_notice.*
7 8
8 class NoticeActivity : AppCompatActivity() { 9 class NoticeActivity : AppCompatActivity() {
...@@ -11,6 +12,36 @@ class NoticeActivity : AppCompatActivity() { ...@@ -11,6 +12,36 @@ class NoticeActivity : AppCompatActivity() {
11 super.onCreate(savedInstanceState) 12 super.onCreate(savedInstanceState)
12 setContentView(R.layout.activity_notice) 13 setContentView(R.layout.activity_notice)
13 14
15 + // 네비게이션 뷰 포커스 맞추는 코드
16 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_notice) as BottomNavigationView
17 + bottomNavigationView.selectedItemId = R.id.bottomInfo
18 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
19 + }
14 20
21 + private val mOnNavigationItemSelectedListener=
22 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
23 + when (item.itemId){
24 + R.id.bottomHome ->{
25 + val intent = Intent(this, SignInActivity::class.java)
26 + startActivity(intent)
27 + return@OnNavigationItemSelectedListener true
28 + }
29 + R.id.bottomRecommend ->{
30 + val intent = Intent(this, RecommendActivity::class.java)
31 + startActivity(intent)
32 + return@OnNavigationItemSelectedListener true
33 + }
34 + R.id.bottomFavorites ->{
35 + val intent = Intent(this, FavoritesActivity::class.java)
36 + startActivity(intent)
37 + return@OnNavigationItemSelectedListener true
38 + }
39 + R.id.bottomInfo ->{
40 + val intent = Intent(this, InfoActivity::class.java)
41 + startActivity(intent)
42 + return@OnNavigationItemSelectedListener true
43 + }
44 + }
45 + false
15 } 46 }
16 } 47 }
......
...@@ -9,12 +9,14 @@ import android.view.View ...@@ -9,12 +9,14 @@ import android.view.View
9 import android.view.ViewGroup 9 import android.view.ViewGroup
10 import android.widget.Toast 10 import android.widget.Toast
11 import androidx.recyclerview.widget.RecyclerView 11 import androidx.recyclerview.widget.RecyclerView
12 +import com.google.firebase.database.FirebaseDatabase
12 import kotlinx.android.synthetic.main.item_policy.view.* 13 import kotlinx.android.synthetic.main.item_policy.view.*
13 import kotlinx.android.synthetic.main.item_policyfield.view.* 14 import kotlinx.android.synthetic.main.item_policyfield.view.*
14 import java.time.LocalDate 15 import java.time.LocalDate
15 import java.text.ParseException 16 import java.text.ParseException
16 import java.text.SimpleDateFormat 17 import java.text.SimpleDateFormat
17 import java.time.format.DateTimeFormatter 18 import java.time.format.DateTimeFormatter
19 +import kotlin.math.abs
18 20
19 21
20 class PolicyAdapter(private val items: ArrayList<PolicyItem>) : 22 class PolicyAdapter(private val items: ArrayList<PolicyItem>) :
...@@ -75,23 +77,30 @@ class PolicyAdapter(private val items: ArrayList<PolicyItem>) : ...@@ -75,23 +77,30 @@ class PolicyAdapter(private val items: ArrayList<PolicyItem>) :
75 fun date_calculate(dday : String) { 77 fun date_calculate(dday : String) {
76 val matchResult : Sequence<MatchResult> = Regex.findAll("abcd") 78 val matchResult : Sequence<MatchResult> = Regex.findAll("abcd")
77 return 79 return
78 - }*/ 80 + }
81 +*/
82 +
79 fun bind(item: PolicyItem) { 83 fun bind(item: PolicyItem) {
80 view.policyImage.setImageDrawable(item.policyItemImage) 84 view.policyImage.setImageDrawable(item.policyItemImage)
81 if (item.policyItemDate == "") { item.policyItemDate = "상시" } 85 if (item.policyItemDate == "") { item.policyItemDate = "상시" }
82 - view.policyDday.text = item.policyItemDate 86 + view.policyDday.text = item.D_day
83 view.policyHost.text = item.policyItemKeyword 87 view.policyHost.text = item.policyItemKeyword
84 view.policyTitle.text = item.policyItemPolicy 88 view.policyTitle.text = item.policyItemPolicy
85 view.policyScore.rating= item.policyScore 89 view.policyScore.rating= item.policyScore
90 + view.viewCount.text = "조회수 : " + abs(item.policyItemView).toString()
86 91
87 92
88 93
89 if(item.policyItemPolicy in prof.getString("favorstringlist","")!!.split("@").toMutableSet()){ 94 if(item.policyItemPolicy in prof.getString("favorstringlist","")!!.split("@").toMutableSet()){
90 view.policyFavor.isChecked=true 95 view.policyFavor.isChecked=true
91 - }else{ 96 + }
97 + else{
92 } 98 }
93 view.setOnClickListener{ 99 view.setOnClickListener{
94 100
101 + val policy_db = FirebaseDatabase.getInstance().reference
102 + policy_db.child(item.Value).child("View").setValue(item.policyItemView - 1)
103 +
95 val intent=Intent(view.context, DetailActivity::class.java) 104 val intent=Intent(view.context, DetailActivity::class.java)
96 //putExtraStart 105 //putExtraStart
97 intent.putExtra("key",item.policyItemPolicy) 106 intent.putExtra("key",item.policyItemPolicy)
......
...@@ -26,5 +26,7 @@ class PolicyItem(val policyItemImage: Drawable, ...@@ -26,5 +26,7 @@ class PolicyItem(val policyItemImage: Drawable,
26 val policyCategory13: String, 26 val policyCategory13: String,
27 val policyCategory14: String, 27 val policyCategory14: String,
28 val policyCategory15: String, 28 val policyCategory15: String,
29 - val policyCategory16: String
30 -) {}
...\ No newline at end of file ...\ No newline at end of file
29 + val policyCategory16: String,
30 + val Value : String,
31 + val D_day : String
32 +)
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,6 +4,7 @@ import android.content.Intent ...@@ -4,6 +4,7 @@ import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 import android.webkit.WebView 6 import android.webkit.WebView
7 +import com.google.android.material.bottomnavigation.BottomNavigationView
7 import kotlinx.android.synthetic.main.activity_privacy_policy.* 8 import kotlinx.android.synthetic.main.activity_privacy_policy.*
8 9
9 class PrivacyPolicyActivity : AppCompatActivity() { 10 class PrivacyPolicyActivity : AppCompatActivity() {
...@@ -12,6 +13,11 @@ class PrivacyPolicyActivity : AppCompatActivity() { ...@@ -12,6 +13,11 @@ class PrivacyPolicyActivity : AppCompatActivity() {
12 super.onCreate(savedInstanceState) 13 super.onCreate(savedInstanceState)
13 setContentView(R.layout.activity_privacy_policy) 14 setContentView(R.layout.activity_privacy_policy)
14 15
16 +
17 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_privacy) as BottomNavigationView
18 + bottomNavigationView.selectedItemId = R.id.bottomInfo
19 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
20 +
15 val web : WebView = findViewById(R.id.privacy) 21 val web : WebView = findViewById(R.id.privacy)
16 val summary = "<Wello> 개인정보 처리방침\n" + 22 val summary = "<Wello> 개인정보 처리방침\n" +
17 "\n" + 23 "\n" +
...@@ -129,4 +135,31 @@ class PrivacyPolicyActivity : AppCompatActivity() { ...@@ -129,4 +135,31 @@ class PrivacyPolicyActivity : AppCompatActivity() {
129 web.loadData(summary, "text/html", "UTF-8") 135 web.loadData(summary, "text/html", "UTF-8")
130 136
131 } 137 }
138 +
139 + private val mOnNavigationItemSelectedListener=
140 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
141 + when (item.itemId){
142 + R.id.bottomHome ->{
143 + val intent = Intent(this, SignInActivity::class.java)
144 + startActivity(intent)
145 + return@OnNavigationItemSelectedListener true
146 + }
147 + R.id.bottomRecommend ->{
148 + val intent = Intent(this, RecommendActivity::class.java)
149 + startActivity(intent)
150 + return@OnNavigationItemSelectedListener true
151 + }
152 + R.id.bottomFavorites ->{
153 + val intent = Intent(this, FavoritesActivity::class.java)
154 + startActivity(intent)
155 + return@OnNavigationItemSelectedListener true
156 + }
157 + R.id.bottomInfo ->{
158 + val intent = Intent(this, InfoActivity::class.java)
159 + startActivity(intent)
160 + return@OnNavigationItemSelectedListener true
161 + }
162 + }
163 + false
164 + }
132 } 165 }
......
...@@ -3,6 +3,7 @@ package com.example.vip ...@@ -3,6 +3,7 @@ package com.example.vip
3 import android.content.Intent 3 import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 +import com.google.android.material.bottomnavigation.BottomNavigationView
6 import kotlinx.android.synthetic.main.activity_push_alarm.* 7 import kotlinx.android.synthetic.main.activity_push_alarm.*
7 8
8 class PushInfoActivity : AppCompatActivity() { 9 class PushInfoActivity : AppCompatActivity() {
...@@ -12,5 +13,35 @@ class PushInfoActivity : AppCompatActivity() { ...@@ -12,5 +13,35 @@ class PushInfoActivity : AppCompatActivity() {
12 setContentView(R.layout.activity_push_alarm) 13 setContentView(R.layout.activity_push_alarm)
13 14
14 15
16 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_push) as BottomNavigationView
17 + bottomNavigationView.selectedItemId = R.id.bottomInfo
18 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
19 + }
20 +
21 + private val mOnNavigationItemSelectedListener=
22 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
23 + when (item.itemId){
24 + R.id.bottomHome ->{
25 + val intent = Intent(this, SignInActivity::class.java)
26 + startActivity(intent)
27 + return@OnNavigationItemSelectedListener true
28 + }
29 + R.id.bottomRecommend ->{
30 + val intent = Intent(this, RecommendActivity::class.java)
31 + startActivity(intent)
32 + return@OnNavigationItemSelectedListener true
33 + }
34 + R.id.bottomFavorites ->{
35 + val intent = Intent(this, FavoritesActivity::class.java)
36 + startActivity(intent)
37 + return@OnNavigationItemSelectedListener true
38 + }
39 + R.id.bottomInfo ->{
40 + val intent = Intent(this, InfoActivity::class.java)
41 + startActivity(intent)
42 + return@OnNavigationItemSelectedListener true
43 + }
44 + }
45 + false
15 } 46 }
16 } 47 }
......
...@@ -4,6 +4,7 @@ import android.content.Intent ...@@ -4,6 +4,7 @@ import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 import androidx.recyclerview.widget.LinearLayoutManager 6 import androidx.recyclerview.widget.LinearLayoutManager
7 +import com.google.android.material.bottomnavigation.BottomNavigationView
7 import kotlinx.android.synthetic.main.activity_questions.* 8 import kotlinx.android.synthetic.main.activity_questions.*
8 9
9 var QnAList = arrayListOf<QnAItem>() 10 var QnAList = arrayListOf<QnAItem>()
...@@ -17,5 +18,34 @@ class QuestionsActivity : AppCompatActivity() { ...@@ -17,5 +18,34 @@ class QuestionsActivity : AppCompatActivity() {
17 qna_rv.adapter = QnAAdapter() 18 qna_rv.adapter = QnAAdapter()
18 qna_rv.layoutManager = LinearLayoutManager(this) 19 qna_rv.layoutManager = LinearLayoutManager(this)
19 20
21 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_qna) as BottomNavigationView
22 + bottomNavigationView.selectedItemId = R.id.bottomInfo
23 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
24 + }
25 + private val mOnNavigationItemSelectedListener=
26 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
27 + when (item.itemId){
28 + R.id.bottomHome ->{
29 + val intent = Intent(this, SignInActivity::class.java)
30 + startActivity(intent)
31 + return@OnNavigationItemSelectedListener true
32 + }
33 + R.id.bottomRecommend ->{
34 + val intent = Intent(this, RecommendActivity::class.java)
35 + startActivity(intent)
36 + return@OnNavigationItemSelectedListener true
37 + }
38 + R.id.bottomFavorites ->{
39 + val intent = Intent(this, FavoritesActivity::class.java)
40 + startActivity(intent)
41 + return@OnNavigationItemSelectedListener true
42 + }
43 + R.id.bottomInfo ->{
44 + val intent = Intent(this, InfoActivity::class.java)
45 + startActivity(intent)
46 + return@OnNavigationItemSelectedListener true
47 + }
48 + }
49 + false
20 } 50 }
21 } 51 }
......
...@@ -57,7 +57,9 @@ data class MemoItemRecom( ...@@ -57,7 +57,9 @@ data class MemoItemRecom(
57 val Category13 : String = "", 57 val Category13 : String = "",
58 val Category14 : String = "", 58 val Category14 : String = "",
59 val Category15 : String = "", 59 val Category15 : String = "",
60 - val Category16 : String = "" 60 + val Category16 : String = "",
61 + val Value : String = "",
62 + val D_day : String = ""
61 ) 63 )
62 64
63 class RecommendActivity : AppCompatActivity() { 65 class RecommendActivity : AppCompatActivity() {
...@@ -116,7 +118,9 @@ class RecommendActivity : AppCompatActivity() { ...@@ -116,7 +118,9 @@ class RecommendActivity : AppCompatActivity() {
116 memo.Category13, 118 memo.Category13,
117 memo.Category14, 119 memo.Category14,
118 memo.Category15, 120 memo.Category15,
119 - memo.Category16 121 + memo.Category16,
122 + memo.Value,
123 + memo.D_day
120 ) 124 )
121 ) 125 )
122 } 126 }
...@@ -163,7 +167,9 @@ class RecommendActivity : AppCompatActivity() { ...@@ -163,7 +167,9 @@ class RecommendActivity : AppCompatActivity() {
163 memo!!.Category13, 167 memo!!.Category13,
164 memo!!.Category14, 168 memo!!.Category14,
165 memo!!.Category15, 169 memo!!.Category15,
166 - memo!!.Category16 170 + memo!!.Category16,
171 + memo!!.Value,
172 + memo!!.D_day
167 ) 173 )
168 ) 174 )
169 } 175 }
......
...@@ -3,6 +3,7 @@ package com.example.vip ...@@ -3,6 +3,7 @@ package com.example.vip
3 import android.content.Intent 3 import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 +import com.google.android.material.bottomnavigation.BottomNavigationView
6 import kotlinx.android.synthetic.main.activity_settings_in_form.* 7 import kotlinx.android.synthetic.main.activity_settings_in_form.*
7 8
8 class SettingsInForm : AppCompatActivity() { 9 class SettingsInForm : AppCompatActivity() {
...@@ -11,6 +12,10 @@ class SettingsInForm : AppCompatActivity() { ...@@ -11,6 +12,10 @@ class SettingsInForm : AppCompatActivity() {
11 super.onCreate(savedInstanceState) 12 super.onCreate(savedInstanceState)
12 setContentView(R.layout.activity_settings_in_form) 13 setContentView(R.layout.activity_settings_in_form)
13 14
15 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_setting) as BottomNavigationView
16 + bottomNavigationView.selectedItemId = R.id.bottomInfo
17 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
18 +
14 accountBtn.setOnClickListener { 19 accountBtn.setOnClickListener {
15 var intent = Intent(this, AccountSettingActivity::class.java) 20 var intent = Intent(this, AccountSettingActivity::class.java)
16 startActivity(intent) 21 startActivity(intent)
...@@ -26,4 +31,31 @@ class SettingsInForm : AppCompatActivity() { ...@@ -26,4 +31,31 @@ class SettingsInForm : AppCompatActivity() {
26 startActivity(intent) 31 startActivity(intent)
27 } 32 }
28 } 33 }
34 +
35 + private val mOnNavigationItemSelectedListener=
36 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
37 + when (item.itemId){
38 + R.id.bottomHome ->{
39 + val intent = Intent(this, SignInActivity::class.java)
40 + startActivity(intent)
41 + return@OnNavigationItemSelectedListener true
42 + }
43 + R.id.bottomRecommend ->{
44 + val intent = Intent(this, RecommendActivity::class.java)
45 + startActivity(intent)
46 + return@OnNavigationItemSelectedListener true
47 + }
48 + R.id.bottomFavorites ->{
49 + val intent = Intent(this, FavoritesActivity::class.java)
50 + startActivity(intent)
51 + return@OnNavigationItemSelectedListener true
52 + }
53 + R.id.bottomInfo ->{
54 + val intent = Intent(this, InfoActivity::class.java)
55 + startActivity(intent)
56 + return@OnNavigationItemSelectedListener true
57 + }
58 + }
59 + false
60 + }
29 } 61 }
......
...@@ -4,6 +4,7 @@ import android.content.Intent ...@@ -4,6 +4,7 @@ import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 import android.webkit.WebView 6 import android.webkit.WebView
7 +import com.google.android.material.bottomnavigation.BottomNavigationView
7 import kotlinx.android.synthetic.main.activity_terms_detail.* 8 import kotlinx.android.synthetic.main.activity_terms_detail.*
8 9
9 class TermsDetailActivity : AppCompatActivity() { 10 class TermsDetailActivity : AppCompatActivity() {
...@@ -12,6 +13,11 @@ class TermsDetailActivity : AppCompatActivity() { ...@@ -12,6 +13,11 @@ class TermsDetailActivity : AppCompatActivity() {
12 super.onCreate(savedInstanceState) 13 super.onCreate(savedInstanceState)
13 setContentView(R.layout.activity_terms_detail) 14 setContentView(R.layout.activity_terms_detail)
14 15
16 +
17 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_terms_detail) as BottomNavigationView
18 + bottomNavigationView.selectedItemId = R.id.bottomInfo
19 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
20 +
15 val web : WebView = findViewById(R.id.use_terms) 21 val web : WebView = findViewById(R.id.use_terms)
16 val summary = "전자상거래(인터넷사이버몰) 표준약관\n" + 22 val summary = "전자상거래(인터넷사이버몰) 표준약관\n" +
17 "\n" + 23 "\n" +
...@@ -263,6 +269,31 @@ class TermsDetailActivity : AppCompatActivity() { ...@@ -263,6 +269,31 @@ class TermsDetailActivity : AppCompatActivity() {
263 "\n" + 269 "\n" +
264 "\n" 270 "\n"
265 web.loadData(summary, "text/html", "UTF-8") 271 web.loadData(summary, "text/html", "UTF-8")
266 - 272 + }
273 + private val mOnNavigationItemSelectedListener=
274 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
275 + when (item.itemId){
276 + R.id.bottomHome ->{
277 + val intent = Intent(this, SignInActivity::class.java)
278 + startActivity(intent)
279 + return@OnNavigationItemSelectedListener true
280 + }
281 + R.id.bottomRecommend ->{
282 + val intent = Intent(this, RecommendActivity::class.java)
283 + startActivity(intent)
284 + return@OnNavigationItemSelectedListener true
285 + }
286 + R.id.bottomFavorites ->{
287 + val intent = Intent(this, FavoritesActivity::class.java)
288 + startActivity(intent)
289 + return@OnNavigationItemSelectedListener true
290 + }
291 + R.id.bottomInfo ->{
292 + val intent = Intent(this, InfoActivity::class.java)
293 + startActivity(intent)
294 + return@OnNavigationItemSelectedListener true
295 + }
296 + }
297 + false
267 } 298 }
268 } 299 }
......
...@@ -3,6 +3,7 @@ package com.example.vip ...@@ -3,6 +3,7 @@ package com.example.vip
3 import android.content.Intent 3 import android.content.Intent
4 import androidx.appcompat.app.AppCompatActivity 4 import androidx.appcompat.app.AppCompatActivity
5 import android.os.Bundle 5 import android.os.Bundle
6 +import com.google.android.material.bottomnavigation.BottomNavigationView
6 import kotlinx.android.synthetic.main.activity_terms_of_use.* 7 import kotlinx.android.synthetic.main.activity_terms_of_use.*
7 8
8 class TermsOfUserActivity : AppCompatActivity() { 9 class TermsOfUserActivity : AppCompatActivity() {
...@@ -11,6 +12,10 @@ class TermsOfUserActivity : AppCompatActivity() { ...@@ -11,6 +12,10 @@ class TermsOfUserActivity : AppCompatActivity() {
11 super.onCreate(savedInstanceState) 12 super.onCreate(savedInstanceState)
12 setContentView(R.layout.activity_terms_of_use) 13 setContentView(R.layout.activity_terms_of_use)
13 14
15 + val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation_terms_of_use) as BottomNavigationView
16 + bottomNavigationView.selectedItemId = R.id.bottomInfo
17 + bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
18 +
14 terms_use.setOnClickListener{ 19 terms_use.setOnClickListener{
15 var intent = Intent(this, TermsDetailActivity::class.java) 20 var intent = Intent(this, TermsDetailActivity::class.java)
16 startActivity(intent) 21 startActivity(intent)
...@@ -20,4 +25,31 @@ class TermsOfUserActivity : AppCompatActivity() { ...@@ -20,4 +25,31 @@ class TermsOfUserActivity : AppCompatActivity() {
20 startActivity(intent) 25 startActivity(intent)
21 } 26 }
22 } 27 }
28 +
29 + private val mOnNavigationItemSelectedListener=
30 + BottomNavigationView.OnNavigationItemSelectedListener{ item->
31 + when (item.itemId){
32 + R.id.bottomHome ->{
33 + val intent = Intent(this, SignInActivity::class.java)
34 + startActivity(intent)
35 + return@OnNavigationItemSelectedListener true
36 + }
37 + R.id.bottomRecommend ->{
38 + val intent = Intent(this, RecommendActivity::class.java)
39 + startActivity(intent)
40 + return@OnNavigationItemSelectedListener true
41 + }
42 + R.id.bottomFavorites ->{
43 + val intent = Intent(this, FavoritesActivity::class.java)
44 + startActivity(intent)
45 + return@OnNavigationItemSelectedListener true
46 + }
47 + R.id.bottomInfo ->{
48 + val intent = Intent(this, InfoActivity::class.java)
49 + startActivity(intent)
50 + return@OnNavigationItemSelectedListener true
51 + }
52 + }
53 + false
54 + }
23 } 55 }
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
87 </LinearLayout> 87 </LinearLayout>
88 88
89 <com.google.android.material.bottomnavigation.BottomNavigationView 89 <com.google.android.material.bottomnavigation.BottomNavigationView
90 - android:id="@+id/bottomNavigation" 90 + android:id="@+id/bottomNavigation_account_setting"
91 android:layout_width="match_parent" 91 android:layout_width="match_parent"
92 android:layout_height="wrap_content" 92 android:layout_height="wrap_content"
93 android:layout_gravity="bottom" 93 android:layout_gravity="bottom"
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
154 </LinearLayout> 154 </LinearLayout>
155 155
156 <com.google.android.material.bottomnavigation.BottomNavigationView 156 <com.google.android.material.bottomnavigation.BottomNavigationView
157 - android:id="@+id/bottomNavigation" 157 + android:id="@+id/bottomNavigation_notice"
158 android:layout_width="match_parent" 158 android:layout_width="match_parent"
159 android:layout_height="wrap_content" 159 android:layout_height="wrap_content"
160 android:layout_gravity="bottom" 160 android:layout_gravity="bottom"
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 </LinearLayout> 40 </LinearLayout>
41 41
42 <com.google.android.material.bottomnavigation.BottomNavigationView 42 <com.google.android.material.bottomnavigation.BottomNavigationView
43 - android:id="@+id/bottomNavigation" 43 + android:id="@+id/bottomNavigation_privacy"
44 android:layout_width="match_parent" 44 android:layout_width="match_parent"
45 android:layout_height="wrap_content" 45 android:layout_height="wrap_content"
46 android:layout_gravity="bottom" 46 android:layout_gravity="bottom"
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
80 </LinearLayout> 80 </LinearLayout>
81 81
82 <com.google.android.material.bottomnavigation.BottomNavigationView 82 <com.google.android.material.bottomnavigation.BottomNavigationView
83 - android:id="@+id/bottomNavigation" 83 + android:id="@+id/bottomNavigation_push"
84 android:layout_width="match_parent" 84 android:layout_width="match_parent"
85 android:layout_height="wrap_content" 85 android:layout_height="wrap_content"
86 android:layout_gravity="bottom" 86 android:layout_gravity="bottom"
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
80 </LinearLayout> 80 </LinearLayout>
81 81
82 <com.google.android.material.bottomnavigation.BottomNavigationView 82 <com.google.android.material.bottomnavigation.BottomNavigationView
83 - android:id="@+id/bottomNavigation" 83 + android:id="@+id/bottomNavigation_qna"
84 android:layout_width="match_parent" 84 android:layout_width="match_parent"
85 android:layout_height="wrap_content" 85 android:layout_height="wrap_content"
86 android:layout_gravity="bottom" 86 android:layout_gravity="bottom"
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
124 </LinearLayout> 124 </LinearLayout>
125 125
126 <com.google.android.material.bottomnavigation.BottomNavigationView 126 <com.google.android.material.bottomnavigation.BottomNavigationView
127 - android:id="@+id/bottomNavigation" 127 + android:id="@+id/bottomNavigation_setting"
128 android:layout_width="match_parent" 128 android:layout_width="match_parent"
129 android:layout_height="wrap_content" 129 android:layout_height="wrap_content"
130 android:layout_gravity="bottom" 130 android:layout_gravity="bottom"
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 </LinearLayout> 40 </LinearLayout>
41 41
42 <com.google.android.material.bottomnavigation.BottomNavigationView 42 <com.google.android.material.bottomnavigation.BottomNavigationView
43 - android:id="@+id/bottomNavigation" 43 + android:id="@+id/bottomNavigation_terms_detail"
44 android:layout_width="match_parent" 44 android:layout_width="match_parent"
45 android:layout_height="wrap_content" 45 android:layout_height="wrap_content"
46 android:layout_gravity="bottom" 46 android:layout_gravity="bottom"
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
100 </LinearLayout> 100 </LinearLayout>
101 101
102 <com.google.android.material.bottomnavigation.BottomNavigationView 102 <com.google.android.material.bottomnavigation.BottomNavigationView
103 - android:id="@+id/bottomNavigation" 103 + android:id="@+id/bottomNavigation_terms_of_use"
104 android:layout_width="match_parent" 104 android:layout_width="match_parent"
105 android:layout_height="wrap_content" 105 android:layout_height="wrap_content"
106 android:layout_gravity="bottom" 106 android:layout_gravity="bottom"
......
...@@ -76,26 +76,43 @@ ...@@ -76,26 +76,43 @@
76 android:layout_height="10dp" 76 android:layout_height="10dp"
77 android:layout_marginLeft="11dp" 77 android:layout_marginLeft="11dp"
78 android:layout_marginRight="10dp" 78 android:layout_marginRight="10dp"
79 - android:layout_weight="1" 79 + android:layout_weight="1.2"
80 android:ellipsize="end" 80 android:ellipsize="end"
81 - android:gravity="left|center_vertical" 81 + android:gravity="left"
82 android:maxLines="1" 82 android:maxLines="1"
83 + android:paddingTop="4dp"
83 android:text="TextView" 84 android:text="TextView"
84 android:textColor="#000" 85 android:textColor="#000"
85 android:textSize="18dp" /> 86 android:textSize="18dp" />
86 87
88 + <LinearLayout
89 + android:layout_width="match_parent"
90 + android:layout_height="wrap_content"
91 + android:layout_weight="0.7"
92 + android:orientation="horizontal">
93 +
87 <RatingBar 94 <RatingBar
88 android:id="@+id/policyScore" 95 android:id="@+id/policyScore"
89 - android:layout_width="240dp" 96 + style="?android:attr/ratingBarStyleSmall"
90 - android:layout_height="22dp" 97 + android:layout_width="wrap_content"
91 - android:layout_gravity="center" 98 + android:layout_height="wrap_content"
92 - android:layout_weight="1" 99 + android:layout_marginLeft="20dp"
93 - android:max="5" 100 + android:isIndicator="true"
101 + android:numStars="5"
94 android:rating="3.5" 102 android:rating="3.5"
95 - android:scaleX=".5" 103 + android:stepSize="0.1" />
96 - android:scaleY="0.5" 104 +
97 - android:transformPivotX="0dp" 105 + <TextView
98 - android:transformPivotY="0dp" /> 106 + android:id="@+id/viewCount"
107 + android:layout_width="wrap_content"
108 + android:layout_height="wrap_content"
109 + android:layout_weight="1"
110 + android:gravity="center|right"
111 + android:paddingRight="28dp"
112 + android:text="TextView"
113 + android:textColor="#C04A4A4A" />
114 + </LinearLayout>
115 +
99 </LinearLayout> 116 </LinearLayout>
100 117
101 </LinearLayout> 118 </LinearLayout>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:app="http://schemas.android.com/apk/res-auto" 3 xmlns:app="http://schemas.android.com/apk/res-auto"
4 - android:orientation="horizontal"
5 android:layout_width="match_parent" 4 android:layout_width="match_parent"
6 android:layout_height="wrap_content" 5 android:layout_height="wrap_content"
7 android:layout_margin="3dp" 6 android:layout_margin="3dp"
8 - android:background="@drawable/edgemaking"> 7 + android:background="@drawable/round_ractagle_solid"
8 + android:orientation="horizontal">
9 9
10 10
11 <ImageView 11 <ImageView
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
14 android:layout_height="wrap_content" 14 android:layout_height="wrap_content"
15 android:layout_gravity="center" 15 android:layout_gravity="center"
16 android:layout_weight="0" 16 android:layout_weight="0"
17 - android:adjustViewBounds="true" /> 17 + android:adjustViewBounds="true"
18 + android:padding="3dp" />
18 19
19 <TextView 20 <TextView
20 android:id="@+id/searchIconText" 21 android:id="@+id/searchIconText"
...@@ -22,7 +23,12 @@ ...@@ -22,7 +23,12 @@
22 android:layout_height="wrap_content" 23 android:layout_height="wrap_content"
23 android:layout_gravity="center" 24 android:layout_gravity="center"
24 android:layout_weight="1" 25 android:layout_weight="1"
25 - android:gravity="center" 26 + android:ellipsize="end"
27 + android:gravity="center_horizontal|left|center_vertical"
28 + android:maxLines="1"
29 + android:paddingLeft="4dp"
30 + android:paddingRight="7dp"
31 + android:text="dfefef"
26 android:textSize="20sp" /> 32 android:textSize="20sp" />
27 33
28 </LinearLayout> 34 </LinearLayout>
...\ No newline at end of file ...\ No newline at end of file
......
1 <resources> 1 <resources>
2 <string name="app_name">WELLO</string> 2 <string name="app_name">WELLO</string>
3 -
4 <string name="title01">교육</string> 3 <string name="title01">교육</string>
5 <string name="title02">고용</string> 4 <string name="title02">고용</string>
6 <string name="title03">주거</string> 5 <string name="title03">주거</string>
......