신기성

lasting merging

Showing 92 changed files with 684 additions and 440 deletions
1 wello_firebase_SDKKey.json 1 wello_firebase_SDKKey.json
2 __pycache__ 2 __pycache__
3 vip_key.jks 3 vip_key.jks
4 -backend/wello_firebase_SDKKey.json
...\ No newline at end of file ...\ No newline at end of file
4 +backend/wello_firebase_SDKKey.json
5 +backend/result.json
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -71,4 +71,4 @@ for i, categorys in enumerate(pre_topic): ...@@ -71,4 +71,4 @@ for i, categorys in enumerate(pre_topic):
71 71
72 72
73 for push in push_index: 73 for push in push_index:
74 - send_to_topic('[가정복지부] 기성이를 보유하신 가정에 지원금을 드립니다.', topics[push]) 74 + send_to_topic('wello 화이팅~~.', topics[push])
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
4 4
5 <application 5 <application
6 android:allowBackup="true" 6 android:allowBackup="true"
7 - android:icon="@mipmap/ic_launcher" 7 + android:icon="@mipmap/ic_launcher_real2"
8 android:label="@string/app_name" 8 android:label="@string/app_name"
9 - android:roundIcon="@mipmap/ic_launcher_round" 9 + android:roundIcon="@mipmap/ic_launcher_real2_round"
10 android:supportsRtl="true" 10 android:supportsRtl="true"
11 android:theme="@style/NoActionBar"> 11 android:theme="@style/NoActionBar">
12 <activity android:name=".InputProfilThirdFiveActivity"></activity> 12 <activity android:name=".InputProfilThirdFiveActivity"></activity>
......
...@@ -16,7 +16,6 @@ import com.google.firebase.database.FirebaseDatabase ...@@ -16,7 +16,6 @@ import com.google.firebase.database.FirebaseDatabase
16 import com.google.firebase.database.ValueEventListener 16 import com.google.firebase.database.ValueEventListener
17 import kotlinx.android.synthetic.main.fragment_a.* 17 import kotlinx.android.synthetic.main.fragment_a.*
18 18
19 -
20 class AFragment : Fragment() { 19 class AFragment : Fragment() {
21 20
22 override fun onCreateView( 21 override fun onCreateView(
...@@ -28,6 +27,9 @@ class AFragment : Fragment() { ...@@ -28,6 +27,9 @@ class AFragment : Fragment() {
28 override fun onActivityCreated(savedInstanceState: Bundle?) { 27 override fun onActivityCreated(savedInstanceState: Bundle?) {
29 super.onActivityCreated(savedInstanceState) 28 super.onActivityCreated(savedInstanceState)
30 29
30 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
31 +
32 + ////// DB 긁어오는 곳 /////////
31 val policyList = ArrayList<PolicyItem>() 33 val policyList = ArrayList<PolicyItem>()
32 var recomdatabase = FirebaseDatabase.getInstance().reference 34 var recomdatabase = FirebaseDatabase.getInstance().reference
33 35
...@@ -37,46 +39,65 @@ class AFragment : Fragment() { ...@@ -37,46 +39,65 @@ class AFragment : Fragment() {
37 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 39 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
38 } 40 }
39 override fun onDataChange(dataSnapshot: DataSnapshot) { 41 override fun onDataChange(dataSnapshot: DataSnapshot) {
40 - for (memoSnapshot in dataSnapshot.children){ 42 + //if (policyList0.size == 0) {
43 +
44 + for (memoSnapshot in dataSnapshot.children) {
41 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 45 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
42 46
43 - policyList.add( 47 +
44 - PolicyItem( 48 + var all_flag = arrayListOf<String>()
45 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 49 + var check_flag = arrayListOf<String>()
46 - memo!!.Policy, 50 +
47 - memo!!.Content, 51 + var user_category = arrayListOf<String>()
48 - memo!!.Link, 52 + var user_topic = prof.getString("existing_topic","none")
49 - memo!!.View, 53 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
50 - memo!!.Keyword, 54 +
51 - memo!!.Date, 55 + val regex = "c[0-9]+[_][0-9]+".toRegex()
52 - memo!!.Review, 56 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
53 - memo!!.Score, 57 +
54 - memo!!.Category1, 58 + for(i in matchResult) {
55 - memo!!.Category2, 59 + if (i.value.split("_")[1] != "1") {
56 - memo!!.Category3, 60 + user_category.add(i.value)
57 - memo!!.Category4, 61 + }
58 - memo!!.Category5, 62 + }
59 - memo!!.Category6, 63 +
60 - memo!!.Category7, 64 + for(i in user_category) {
61 - memo!!.Category8, 65 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
62 - memo!!.Category9, 66 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
63 - memo!!.Category10, 67 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
64 - memo!!.Category11, 68 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
65 - memo!!.Category12, 69 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
66 - memo!!.Category13, 70 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
67 - memo!!.Category14, 71 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
68 - memo!!.Category15, 72 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
69 - memo!!.Category16, 73 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
70 - memo!!.Value, 74 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
71 - memo!!.D_day 75 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
76 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
77 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
78 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
79 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
80 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
81 + }
82 +
83 +
84 + var set_all = all_flag.distinct()
85 + var set_check = check_flag.distinct()
86 +
87 +
88 +
89 + if (set_all.size == set_check.size) {
90 + policyList.add(
91 + PolicyItem(
92 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
93 + )
72 ) 94 )
73 - ) 95 + val adapter = PolicyAdapter(policyList)
74 - val adapter = PolicyAdapter(policyList) 96 + policyRecyclerView.adapter = adapter
75 - policyRecyclerView.adapter = adapter 97 + policyRecyclerView.setItemViewCacheSize((200000000))
76 - policyRecyclerView.setItemViewCacheSize((200000000)) 98 + }
77 } 99 }
78 - //val adapter = PolicyAdapter(policyList) 100 + Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
79 - //policyRecyclerView.adapter = adapter
80 } 101 }
81 }) 102 })
82 } 103 }
......
1 package com.example.vip 1 package com.example.vip
2 2
3 3
4 +import android.content.Context
5 +import android.content.SharedPreferences
4 import android.os.Bundle 6 import android.os.Bundle
5 import androidx.fragment.app.Fragment 7 import androidx.fragment.app.Fragment
6 import android.view.LayoutInflater 8 import android.view.LayoutInflater
7 import android.view.View 9 import android.view.View
8 import android.view.ViewGroup 10 import android.view.ViewGroup
11 +import android.widget.Toast
9 import androidx.core.content.ContextCompat 12 import androidx.core.content.ContextCompat
10 import com.google.firebase.database.DataSnapshot 13 import com.google.firebase.database.DataSnapshot
11 import com.google.firebase.database.DatabaseError 14 import com.google.firebase.database.DatabaseError
...@@ -25,6 +28,9 @@ class BFragment : Fragment() { ...@@ -25,6 +28,9 @@ class BFragment : Fragment() {
25 28
26 override fun onActivityCreated(savedInstanceState: Bundle?) { 29 override fun onActivityCreated(savedInstanceState: Bundle?) {
27 super.onActivityCreated(savedInstanceState) 30 super.onActivityCreated(savedInstanceState)
31 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
32 +
33 + ////// DB 긁어오는 곳 /////////
28 val policyList = ArrayList<PolicyItem>() 34 val policyList = ArrayList<PolicyItem>()
29 var recomdatabase = FirebaseDatabase.getInstance().reference 35 var recomdatabase = FirebaseDatabase.getInstance().reference
30 36
...@@ -34,44 +40,80 @@ class BFragment : Fragment() { ...@@ -34,44 +40,80 @@ class BFragment : Fragment() {
34 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 40 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
35 } 41 }
36 override fun onDataChange(dataSnapshot: DataSnapshot) { 42 override fun onDataChange(dataSnapshot: DataSnapshot) {
37 - for (memoSnapshot in dataSnapshot.children){ 43 + //if (policyList0.size == 0) {
44 +
45 + for (memoSnapshot in dataSnapshot.children) {
38 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 46 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
39 47
40 - policyList.add( 48 +
41 - PolicyItem( 49 + var all_flag = arrayListOf<String>()
42 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 50 + var check_flag = arrayListOf<String>()
43 - memo!!.Policy, 51 +
44 - memo!!.Content, 52 + var user_category = arrayListOf<String>()
45 - memo!!.Link, 53 + var user_topic = prof.getString("existing_topic","none")
46 - memo!!.View, 54 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
47 - memo!!.Keyword, 55 +
48 - memo!!.Date, 56 + val regex = "c[0-9]+[_][0-9]+".toRegex()
49 - memo!!.Review, 57 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
50 - memo!!.Score, 58 +
51 - memo!!.Category1, 59 + for(i in matchResult) {
52 - memo!!.Category2, 60 + if (i.value.split("_")[1] != "1") {
53 - memo!!.Category3, 61 + user_category.add(i.value)
54 - memo!!.Category4, 62 + }
55 - memo!!.Category5, 63 + }
56 - memo!!.Category6, 64 +
57 - memo!!.Category7, 65 + for(i in user_category) {
58 - memo!!.Category8, 66 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
59 - memo!!.Category9, 67 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
60 - memo!!.Category10, 68 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
61 - memo!!.Category11, 69 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
62 - memo!!.Category12, 70 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
63 - memo!!.Category13, 71 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
64 - memo!!.Category14, 72 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
65 - memo!!.Category15, 73 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
66 - memo!!.Category16, 74 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
67 - memo!!.Value, 75 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
68 - memo!!.D_day 76 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
69 - ) 77 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
70 - ) 78 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
79 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
80 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
81 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
82 + }
83 +
84 +
85 + var set_all = all_flag.distinct()
86 + var set_check = check_flag.distinct()
87 +
88 +
89 +
90 + if (set_all.size == set_check.size) {
91 +
92 +
93 + if ("2" in memo!!.Category5.split(" ") ||
94 + "3" in memo!!.Category5.split(" ") ||
95 + "4" in memo!!.Category5.split(" ") ||
96 + "5" in memo!!.Category5.split(" ") ||
97 + "2" in memo!!.Category6.split(" ") ||
98 + "3" in memo!!.Category6.split(" ") ||
99 + "4" in memo!!.Category6.split(" ") ||
100 + "5" in memo!!.Category6.split(" ") ||
101 + "6" in memo!!.Category6.split(" ") ||
102 + "7" in memo!!.Category6.split(" ") ||
103 + "17" in memo!!.Category8.split(" ")) {
104 +
105 + policyList.add(
106 + PolicyItem(
107 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
108 + )
109 + )
110 + val adapter = PolicyAdapter(policyList)
111 + policyRecyclerView.adapter = adapter
112 + policyRecyclerView.setItemViewCacheSize((200000000))
113 + }
114 + }
71 } 115 }
72 - val adapter = PolicyAdapter(policyList) 116 + //Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
73 - policyRecyclerView.adapter = adapter
74 - policyRecyclerView.setItemViewCacheSize((200000000))
75 } 117 }
76 }) 118 })
77 } 119 }
......
1 package com.example.vip 1 package com.example.vip
2 2
3 3
4 +import android.content.Context
5 +import android.content.SharedPreferences
4 import android.os.Bundle 6 import android.os.Bundle
5 import androidx.fragment.app.Fragment 7 import androidx.fragment.app.Fragment
6 import android.view.LayoutInflater 8 import android.view.LayoutInflater
7 import android.view.View 9 import android.view.View
8 import android.view.ViewGroup 10 import android.view.ViewGroup
11 +import android.widget.Toast
9 import androidx.core.content.ContextCompat 12 import androidx.core.content.ContextCompat
10 import com.google.firebase.database.DataSnapshot 13 import com.google.firebase.database.DataSnapshot
11 import com.google.firebase.database.DatabaseError 14 import com.google.firebase.database.DatabaseError
...@@ -27,6 +30,7 @@ class CFragment : Fragment() { ...@@ -27,6 +30,7 @@ class CFragment : Fragment() {
27 super.onActivityCreated(savedInstanceState) 30 super.onActivityCreated(savedInstanceState)
28 val policyList = ArrayList<PolicyItem>() 31 val policyList = ArrayList<PolicyItem>()
29 var recomdatabase = FirebaseDatabase.getInstance().reference 32 var recomdatabase = FirebaseDatabase.getInstance().reference
33 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
30 34
31 recomdatabase.orderByChild("View").addListenerForSingleValueEvent(object : 35 recomdatabase.orderByChild("View").addListenerForSingleValueEvent(object :
32 ValueEventListener { 36 ValueEventListener {
...@@ -34,44 +38,84 @@ class CFragment : Fragment() { ...@@ -34,44 +38,84 @@ class CFragment : Fragment() {
34 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 38 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
35 } 39 }
36 override fun onDataChange(dataSnapshot: DataSnapshot) { 40 override fun onDataChange(dataSnapshot: DataSnapshot) {
37 - for (memoSnapshot in dataSnapshot.children){ 41 + //if (policyList0.size == 0) {
42 +
43 + for (memoSnapshot in dataSnapshot.children) {
38 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 44 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
39 45
40 - policyList.add( 46 +
41 - PolicyItem( 47 + var all_flag = arrayListOf<String>()
42 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 48 + var check_flag = arrayListOf<String>()
43 - memo!!.Policy, 49 +
44 - memo!!.Content, 50 + var user_category = arrayListOf<String>()
45 - memo!!.Link, 51 + var user_topic = prof.getString("existing_topic","none")
46 - memo!!.View, 52 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
47 - memo!!.Keyword, 53 +
48 - memo!!.Date, 54 + val regex = "c[0-9]+[_][0-9]+".toRegex()
49 - memo!!.Review, 55 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
50 - memo!!.Score, 56 +
51 - memo!!.Category1, 57 + for(i in matchResult) {
52 - memo!!.Category2, 58 + if (i.value.split("_")[1] != "1") {
53 - memo!!.Category3, 59 + user_category.add(i.value)
54 - memo!!.Category4, 60 + }
55 - memo!!.Category5, 61 + }
56 - memo!!.Category6, 62 +
57 - memo!!.Category7, 63 + for(i in user_category) {
58 - memo!!.Category8, 64 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
59 - memo!!.Category9, 65 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
60 - memo!!.Category10, 66 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
61 - memo!!.Category11, 67 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
62 - memo!!.Category12, 68 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
63 - memo!!.Category13, 69 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
64 - memo!!.Category14, 70 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
65 - memo!!.Category15, 71 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
66 - memo!!.Category16, 72 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
67 - memo!!.Value, 73 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
68 - memo!!.D_day 74 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
69 - ) 75 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
70 - ) 76 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
77 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
78 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
79 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
80 + }
81 +
82 +
83 + var set_all = all_flag.distinct()
84 + var set_check = check_flag.distinct()
85 +
86 +
87 +
88 + if (set_all.size == set_check.size) {
89 +
90 +
91 + if ("3" in memo!!.Category2.split(" ") ||
92 + "4" in memo!!.Category2.split(" ") ||
93 + "5" in memo!!.Category2.split(" ") ||
94 + "6" in memo!!.Category2.split(" ") ||
95 + "7" in memo!!.Category2.split(" ") ||
96 + "3" in memo!!.Category5.split(" ") ||
97 + "4" in memo!!.Category5.split(" ") ||
98 + "5" in memo!!.Category5.split(" ") ||
99 + "6" in memo!!.Category5.split(" ") ||
100 + "7" in memo!!.Category5.split(" ") ||
101 + "8" in memo!!.Category5.split(" ") ||
102 + "9" in memo!!.Category5.split(" ") ||
103 + "4" in memo!!.Category6.split(" ") ||
104 + "5" in memo!!.Category6.split(" ") ||
105 + "6" in memo!!.Category6.split(" ") ) {
106 +
107 + policyList.add(
108 + PolicyItem(
109 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
110 + )
111 + )
112 + val adapter = PolicyAdapter(policyList)
113 + policyRecyclerView.adapter = adapter
114 + policyRecyclerView.setItemViewCacheSize((200000000))
115 + }
116 + }
71 } 117 }
72 - val adapter = PolicyAdapter(policyList) 118 + //Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
73 - policyRecyclerView.adapter = adapter
74 - policyRecyclerView.setItemViewCacheSize((200000000))
75 } 119 }
76 }) 120 })
77 } 121 }
......
1 package com.example.vip 1 package com.example.vip
2 2
3 3
4 +import android.content.Context
5 +import android.content.SharedPreferences
4 import android.os.Bundle 6 import android.os.Bundle
5 import androidx.fragment.app.Fragment 7 import androidx.fragment.app.Fragment
6 import android.view.LayoutInflater 8 import android.view.LayoutInflater
7 import android.view.View 9 import android.view.View
8 import android.view.ViewGroup 10 import android.view.ViewGroup
11 +import android.widget.Toast
9 import androidx.core.content.ContextCompat 12 import androidx.core.content.ContextCompat
10 import com.google.firebase.database.DataSnapshot 13 import com.google.firebase.database.DataSnapshot
11 import com.google.firebase.database.DatabaseError 14 import com.google.firebase.database.DatabaseError
...@@ -27,6 +30,7 @@ class DFragment : Fragment() { ...@@ -27,6 +30,7 @@ class DFragment : Fragment() {
27 super.onActivityCreated(savedInstanceState) 30 super.onActivityCreated(savedInstanceState)
28 val policyList = ArrayList<PolicyItem>() 31 val policyList = ArrayList<PolicyItem>()
29 var recomdatabase = FirebaseDatabase.getInstance().reference 32 var recomdatabase = FirebaseDatabase.getInstance().reference
33 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
30 34
31 recomdatabase.orderByChild("View").addListenerForSingleValueEvent(object : 35 recomdatabase.orderByChild("View").addListenerForSingleValueEvent(object :
32 ValueEventListener { 36 ValueEventListener {
...@@ -34,44 +38,81 @@ class DFragment : Fragment() { ...@@ -34,44 +38,81 @@ class DFragment : Fragment() {
34 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 38 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
35 } 39 }
36 override fun onDataChange(dataSnapshot: DataSnapshot) { 40 override fun onDataChange(dataSnapshot: DataSnapshot) {
37 - for (memoSnapshot in dataSnapshot.children){ 41 + //if (policyList0.size == 0) {
42 +
43 + for (memoSnapshot in dataSnapshot.children) {
38 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 44 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
39 45
40 - policyList.add( 46 +
41 - PolicyItem( 47 + var all_flag = arrayListOf<String>()
42 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 48 + var check_flag = arrayListOf<String>()
43 - memo!!.Policy, 49 +
44 - memo!!.Content, 50 + var user_category = arrayListOf<String>()
45 - memo!!.Link, 51 + var user_topic = prof.getString("existing_topic","none")
46 - memo!!.View, 52 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
47 - memo!!.Keyword, 53 +
48 - memo!!.Date, 54 + val regex = "c[0-9]+[_][0-9]+".toRegex()
49 - memo!!.Review, 55 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
50 - memo!!.Score, 56 +
51 - memo!!.Category1, 57 + for(i in matchResult) {
52 - memo!!.Category2, 58 + if (i.value.split("_")[1] != "1") {
53 - memo!!.Category3, 59 + user_category.add(i.value)
54 - memo!!.Category4, 60 + }
55 - memo!!.Category5, 61 + }
56 - memo!!.Category6, 62 +
57 - memo!!.Category7, 63 + for(i in user_category) {
58 - memo!!.Category8, 64 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
59 - memo!!.Category9, 65 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
60 - memo!!.Category10, 66 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
61 - memo!!.Category11, 67 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
62 - memo!!.Category12, 68 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
63 - memo!!.Category13, 69 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
64 - memo!!.Category14, 70 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
65 - memo!!.Category15, 71 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
66 - memo!!.Category16, 72 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
67 - memo!!.Value, 73 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
68 - memo!!.D_day 74 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
69 - ) 75 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
70 - ) 76 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
77 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
78 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
79 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
80 + }
81 +
82 +
83 + var set_all = all_flag.distinct()
84 + var set_check = check_flag.distinct()
85 +
86 +
87 +
88 + if (set_all.size == set_check.size) {
89 +
90 +
91 + if ("2" in memo!!.Category13.split(" ") ||
92 + "3" in memo!!.Category13.split(" ") ||
93 + "2" in memo!!.Category14.split(" ") ||
94 + "3" in memo!!.Category14.split(" ") ||
95 + "2" in memo!!.Category15.split(" ") ||
96 + "3" in memo!!.Category15.split(" ") ||
97 + "2" in memo!!.Category16.split(" ") ||
98 + "3" in memo!!.Category16.split(" ") ||
99 + "4" in memo!!.Category16.split(" ") ||
100 + "5" in memo!!.Category16.split(" ") ||
101 + "6" in memo!!.Category16.split(" ") ||
102 + "7" in memo!!.Category16.split(" ")) {
103 +
104 + policyList.add(
105 + PolicyItem(
106 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
107 + )
108 + )
109 + val adapter = PolicyAdapter(policyList)
110 + policyRecyclerView.adapter = adapter
111 + policyRecyclerView.setItemViewCacheSize((200000000))
112 + }
113 + }
71 } 114 }
72 - val adapter = PolicyAdapter(policyList) 115 + //Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
73 - policyRecyclerView.adapter = adapter
74 - policyRecyclerView.setItemViewCacheSize((200000000))
75 } 116 }
76 }) 117 })
77 } 118 }
......
...@@ -66,7 +66,7 @@ class DetailActivity : AppCompatActivity() { ...@@ -66,7 +66,7 @@ class DetailActivity : AppCompatActivity() {
66 detaildatabase.orderByChild("Policy").startAt(intent.getStringExtra("key")).endAt(intent.getStringExtra("key")+"\uf8ff").addListenerForSingleValueEvent(object : 66 detaildatabase.orderByChild("Policy").startAt(intent.getStringExtra("key")).endAt(intent.getStringExtra("key")+"\uf8ff").addListenerForSingleValueEvent(object :
67 ValueEventListener { 67 ValueEventListener {
68 override fun onCancelled(p0: DatabaseError) { 68 override fun onCancelled(p0: DatabaseError) {
69 - Toast.makeText(this@DetailActivity, "실패부분", Toast.LENGTH_SHORT).show() 69 + //Toast.makeText(this@DetailActivity, "실패부분", Toast.LENGTH_SHORT).show()
70 } 70 }
71 override fun onDataChange(dataSnapshot: DataSnapshot) { 71 override fun onDataChange(dataSnapshot: DataSnapshot) {
72 for (memoSnapshot in dataSnapshot.children){ 72 for (memoSnapshot in dataSnapshot.children){
...@@ -82,7 +82,7 @@ class DetailActivity : AppCompatActivity() { ...@@ -82,7 +82,7 @@ class DetailActivity : AppCompatActivity() {
82 detailDday.text=memo!!.D_day 82 detailDday.text=memo!!.D_day
83 detailTitle.text=memo!!.Policy 83 detailTitle.text=memo!!.Policy
84 detailScore.rating=4.toFloat() 84 detailScore.rating=4.toFloat()
85 - detailFavor.text= memo!!.Keyword 85 + detailFavor.text= "[" + memo!!.Keyword + "]"
86 86
87 val web : WebView = findViewById(R.id.policy_context) 87 val web : WebView = findViewById(R.id.policy_context)
88 val summary : String = memo!!.Content 88 val summary : String = memo!!.Content
...@@ -183,7 +183,7 @@ class DetailActivity : AppCompatActivity() { ...@@ -183,7 +183,7 @@ class DetailActivity : AppCompatActivity() {
183 183
184 184
185 } else { 185 } else {
186 - Toast.makeText(this, "putExtra value not found", Toast.LENGTH_SHORT).show() 186 + //Toast.makeText(this, "putExtra value not found", Toast.LENGTH_SHORT).show()
187 } 187 }
188 188
189 189
......
1 package com.example.vip 1 package com.example.vip
2 2
3 3
4 +import android.content.Context
5 +import android.content.SharedPreferences
4 import android.os.Bundle 6 import android.os.Bundle
5 import androidx.fragment.app.Fragment 7 import androidx.fragment.app.Fragment
6 import android.view.LayoutInflater 8 import android.view.LayoutInflater
7 import android.view.View 9 import android.view.View
8 import android.view.ViewGroup 10 import android.view.ViewGroup
11 +import android.widget.Toast
9 import androidx.core.content.ContextCompat 12 import androidx.core.content.ContextCompat
10 import com.google.firebase.database.DataSnapshot 13 import com.google.firebase.database.DataSnapshot
11 import com.google.firebase.database.DatabaseError 14 import com.google.firebase.database.DatabaseError
...@@ -35,44 +38,95 @@ class EFragment : Fragment() { ...@@ -35,44 +38,95 @@ class EFragment : Fragment() {
35 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 38 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
36 } 39 }
37 override fun onDataChange(dataSnapshot: DataSnapshot) { 40 override fun onDataChange(dataSnapshot: DataSnapshot) {
38 - for (memoSnapshot in dataSnapshot.children){ 41 + //if (policyList0.size == 0) {
42 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
43 +
44 + for (memoSnapshot in dataSnapshot.children) {
39 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 45 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
40 46
41 - policyList.add( 47 +
42 - PolicyItem( 48 + var all_flag = arrayListOf<String>()
43 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 49 + var check_flag = arrayListOf<String>()
44 - memo!!.Policy, 50 +
45 - memo!!.Content, 51 + var user_category = arrayListOf<String>()
46 - memo!!.Link, 52 + var user_topic = prof.getString("existing_topic","none")
47 - memo!!.View, 53 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
48 - memo!!.Keyword, 54 +
49 - memo!!.Date, 55 + val regex = "c[0-9]+[_][0-9]+".toRegex()
50 - memo!!.Review, 56 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
51 - memo!!.Score, 57 +
52 - memo!!.Category1, 58 + for(i in matchResult) {
53 - memo!!.Category2, 59 + if (i.value.split("_")[1] != "1") {
54 - memo!!.Category3, 60 + user_category.add(i.value)
55 - memo!!.Category4, 61 + }
56 - memo!!.Category5, 62 + }
57 - memo!!.Category6, 63 +
58 - memo!!.Category7, 64 + for(i in user_category) {
59 - memo!!.Category8, 65 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
60 - memo!!.Category9, 66 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
61 - memo!!.Category10, 67 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
62 - memo!!.Category11, 68 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
63 - memo!!.Category12, 69 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
64 - memo!!.Category13, 70 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
65 - memo!!.Category14, 71 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
66 - memo!!.Category15, 72 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
67 - memo!!.Category16, 73 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
68 - memo!!.Value, 74 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
69 - memo!!.D_day 75 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
70 - ) 76 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
71 - ) 77 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
78 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
79 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
80 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
81 + }
82 +
83 +
84 + var set_all = all_flag.distinct()
85 + var set_check = check_flag.distinct()
86 +
87 +
88 +
89 + if (set_all.size == set_check.size) {
90 +
91 +
92 + if ("2" in memo!!.Category8.split(" ") ||
93 + "8" in memo!!.Category8.split(" ") ||
94 + "9" in memo!!.Category8.split(" ") ||
95 + "12" in memo!!.Category8.split(" ") ||
96 + "13" in memo!!.Category8.split(" ") ||
97 + "14" in memo!!.Category8.split(" ") ||
98 + "17" in memo!!.Category8.split(" ") ||
99 + "2" in memo!!.Category9.split(" ") ||
100 + "3" in memo!!.Category9.split(" ") ||
101 + "4" in memo!!.Category9.split(" ") ||
102 + "5" in memo!!.Category9.split(" ") ||
103 + "6" in memo!!.Category9.split(" ") ||
104 + "7" in memo!!.Category9.split(" ") ||
105 + "8" in memo!!.Category9.split(" ") ||
106 + "9" in memo!!.Category9.split(" ") ||
107 + "10" in memo!!.Category9.split(" ") ||
108 + "11" in memo!!.Category9.split(" ") ||
109 + "12" in memo!!.Category9.split(" ") ||
110 + "13" in memo!!.Category9.split(" ") ||
111 + "14" in memo!!.Category9.split(" ") ||
112 + "15" in memo!!.Category9.split(" ") ||
113 + "16" in memo!!.Category9.split(" ") ||
114 + "17" in memo!!.Category9.split(" ") ||
115 + "18" in memo!!.Category9.split(" ") ||
116 + "19" in memo!!.Category9.split(" ")) {
117 +
118 + policyList.add(
119 + PolicyItem(
120 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
121 + )
122 + )
123 + val adapter = PolicyAdapter(policyList)
124 + policyRecyclerView.adapter = adapter
125 + policyRecyclerView.setItemViewCacheSize((200000000))
126 + }
127 + }
72 } 128 }
73 - val adapter = PolicyAdapter(policyList) 129 + //Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
74 - policyRecyclerView.adapter = adapter
75 - policyRecyclerView.setItemViewCacheSize((200000000))
76 } 130 }
77 }) 131 })
78 } 132 }
......
...@@ -37,43 +37,77 @@ class FFragment : Fragment() { ...@@ -37,43 +37,77 @@ class FFragment : Fragment() {
37 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 37 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
38 } 38 }
39 override fun onDataChange(dataSnapshot: DataSnapshot) { 39 override fun onDataChange(dataSnapshot: DataSnapshot) {
40 - for (memoSnapshot in dataSnapshot.children){ 40 + //if (policyList0.size == 0) {
41 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
42 +
43 + for (memoSnapshot in dataSnapshot.children) {
41 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 44 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
42 45
43 - policyList.add( 46 +
44 - PolicyItem( 47 + var all_flag = arrayListOf<String>()
45 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 48 + var check_flag = arrayListOf<String>()
46 - memo!!.Policy, 49 +
47 - memo!!.Content, 50 + var user_category = arrayListOf<String>()
48 - memo!!.Link, 51 + var user_topic = prof.getString("existing_topic","none")
49 - memo!!.View, 52 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
50 - memo!!.Keyword, 53 +
51 - memo!!.Date, 54 + val regex = "c[0-9]+[_][0-9]+".toRegex()
52 - memo!!.Review, 55 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
53 - memo!!.Score, 56 +
54 - memo!!.Category1, 57 + for(i in matchResult) {
55 - memo!!.Category2, 58 + if (i.value.split("_")[1] != "1") {
56 - memo!!.Category3, 59 + user_category.add(i.value)
57 - memo!!.Category4, 60 + }
58 - memo!!.Category5, 61 + }
59 - memo!!.Category6, 62 +
60 - memo!!.Category7, 63 + for(i in user_category) {
61 - memo!!.Category8, 64 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
62 - memo!!.Category9, 65 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
63 - memo!!.Category10, 66 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
64 - memo!!.Category11, 67 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
65 - memo!!.Category12, 68 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
66 - memo!!.Category13, 69 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
67 - memo!!.Category14, 70 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
68 - memo!!.Category15, 71 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
69 - memo!!.Category16, 72 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
70 - memo!!.Value, 73 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
71 - memo!!.D_day 74 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
72 - ) 75 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
73 - ) 76 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
77 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
78 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
79 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
80 + }
81 +
82 +
83 + var set_all = all_flag.distinct()
84 + var set_check = check_flag.distinct()
85 +
86 +
87 +
88 + if (set_all.size == set_check.size) {
89 +
90 +
91 + if ("2" in memo!!.Category2.split(" ") ||
92 + "3" in memo!!.Category2.split(" ") ||
93 + "4" in memo!!.Category2.split(" ") ||
94 + "5" in memo!!.Category2.split(" ") ||
95 + "6" in memo!!.Category2.split(" ") ||
96 + "7" in memo!!.Category2.split(" ") ||
97 + "8" in memo!!.Category8.split(" ")) {
98 +
99 + policyList.add(
100 + PolicyItem(
101 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
102 + )
103 + )
104 + val adapter = PolicyAdapter(policyList)
105 + policyRecyclerView.adapter = adapter
106 + policyRecyclerView.setItemViewCacheSize((200000000))
107 + }
108 + }
74 } 109 }
75 - val adapter = PolicyAdapter(policyList) 110 + //Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
76 - policyRecyclerView.adapter = adapter
77 } 111 }
78 }) 112 })
79 } 113 }
......
...@@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity ...@@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
7 import android.os.Bundle 7 import android.os.Bundle
8 import android.view.Menu 8 import android.view.Menu
9 import android.view.MenuItem 9 import android.view.MenuItem
10 +import android.view.View
10 import android.widget.Toast 11 import android.widget.Toast
11 import androidx.appcompat.app.ActionBar 12 import androidx.appcompat.app.ActionBar
12 import androidx.core.content.ContextCompat 13 import androidx.core.content.ContextCompat
...@@ -22,6 +23,7 @@ import kotlinx.android.synthetic.main.activity_recommend.* ...@@ -22,6 +23,7 @@ import kotlinx.android.synthetic.main.activity_recommend.*
22 //import kotlinx.android.synthetic.main.activity_recommend.policyRecyclerView 23 //import kotlinx.android.synthetic.main.activity_recommend.policyRecyclerView
23 import kotlinx.android.synthetic.main.activity_recommend.toolbar 24 import kotlinx.android.synthetic.main.activity_recommend.toolbar
24 import kotlinx.android.synthetic.main.activity_signin.* 25 import kotlinx.android.synthetic.main.activity_signin.*
26 +import kotlinx.android.synthetic.main.search.*
25 27
26 data class MemoItemFavor( 28 data class MemoItemFavor(
27 val Policy : String = "", 29 val Policy : String = "",
...@@ -84,7 +86,7 @@ class FavoritesActivity : AppCompatActivity() { ...@@ -84,7 +86,7 @@ class FavoritesActivity : AppCompatActivity() {
84 favordatabase.orderByChild("Policy").startAt(favor).endAt(favor).addListenerForSingleValueEvent(object : 86 favordatabase.orderByChild("Policy").startAt(favor).endAt(favor).addListenerForSingleValueEvent(object :
85 ValueEventListener { 87 ValueEventListener {
86 override fun onCancelled(p0: DatabaseError) { 88 override fun onCancelled(p0: DatabaseError) {
87 - Toast.makeText(this@FavoritesActivity, "실패부분", Toast.LENGTH_SHORT).show() 89 + //Toast.makeText(this@FavoritesActivity, "실패부분", Toast.LENGTH_SHORT).show()
88 } 90 }
89 override fun onDataChange(dataSnapshot: DataSnapshot) { 91 override fun onDataChange(dataSnapshot: DataSnapshot) {
90 for (memoSnapshot in dataSnapshot.children){ 92 for (memoSnapshot in dataSnapshot.children){
...@@ -125,6 +127,16 @@ class FavoritesActivity : AppCompatActivity() { ...@@ -125,6 +127,16 @@ class FavoritesActivity : AppCompatActivity() {
125 127
126 val adapter = PolicyAdapter(policyList) 128 val adapter = PolicyAdapter(policyList)
127 policyRecyclerView.adapter = adapter 129 policyRecyclerView.adapter = adapter
130 +
131 + if (policyList.size == 0) {
132 + policyRecyclerView.setVisibility(View.GONE)
133 + no_favor.setVisibility(View.VISIBLE)
134 + }
135 + else {
136 + no_favor.setVisibility(View.GONE)
137 + policyRecyclerView.setVisibility(View.VISIBLE)
138 +
139 + }
128 } 140 }
129 }) 141 })
130 } 142 }
......
...@@ -37,43 +37,74 @@ class GFragment : Fragment() { ...@@ -37,43 +37,74 @@ class GFragment : Fragment() {
37 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show() 37 //Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
38 } 38 }
39 override fun onDataChange(dataSnapshot: DataSnapshot) { 39 override fun onDataChange(dataSnapshot: DataSnapshot) {
40 - for (memoSnapshot in dataSnapshot.children){ 40 + //if (policyList0.size == 0) {
41 + val prof: SharedPreferences = view!!.context.getSharedPreferences("profdata", Context.MODE_PRIVATE)
42 +
43 + for (memoSnapshot in dataSnapshot.children) {
41 val memo = memoSnapshot.getValue(MemoItemRecom::class.java) 44 val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
42 45
43 - policyList.add( 46 +
44 - PolicyItem( 47 + var all_flag = arrayListOf<String>()
45 - ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, 48 + var check_flag = arrayListOf<String>()
46 - memo!!.Policy, 49 +
47 - memo!!.Content, 50 + var user_category = arrayListOf<String>()
48 - memo!!.Link, 51 + var user_topic = prof.getString("existing_topic","none")
49 - memo!!.View, 52 + //Toast.makeText(this@RecommendActivity, user_topic, Toast.LENGTH_SHORT).show()
50 - memo!!.Keyword, 53 +
51 - memo!!.Date, 54 + val regex = "c[0-9]+[_][0-9]+".toRegex()
52 - memo!!.Review, 55 + val matchResult : Sequence<MatchResult> = regex.findAll(user_topic.toString())
53 - memo!!.Score, 56 +
54 - memo!!.Category1, 57 + for(i in matchResult) {
55 - memo!!.Category2, 58 + if (i.value.split("_")[1] != "1") {
56 - memo!!.Category3, 59 + user_category.add(i.value)
57 - memo!!.Category4, 60 + }
58 - memo!!.Category5, 61 + }
59 - memo!!.Category6, 62 +
60 - memo!!.Category7, 63 + for(i in user_category) {
61 - memo!!.Category8, 64 + if (i.split("_")[0] == "c1") { all_flag.add("c1"); if ((i.split("_")[1] in memo!!.Category1.split(" ")) || (memo!!.Category1.split(" ")[0] == "1")) { check_flag.add("c1") } }
62 - memo!!.Category9, 65 + if (i.split("_")[0] == "c2") { all_flag.add("c2"); if ((i.split("_")[1] in memo!!.Category2.split(" ")) || (memo!!.Category2.split(" ")[0] == "1")) { check_flag.add("c2") } }
63 - memo!!.Category10, 66 + if (i.split("_")[0] == "c3") { all_flag.add("c3"); if ((i.split("_")[1] in memo!!.Category3.split(" ")) || (memo!!.Category3.split(" ")[0] == "1")) { check_flag.add("c3") } }
64 - memo!!.Category11, 67 + if (i.split("_")[0] == "c4") { all_flag.add("c4"); if ((i.split("_")[1] in memo!!.Category4.split(" ")) || (memo!!.Category4.split(" ")[0] == "1")) { check_flag.add("c4") } }
65 - memo!!.Category12, 68 + if (i.split("_")[0] == "c5") { all_flag.add("c5"); if ((i.split("_")[1] in memo!!.Category5.split(" ")) || (memo!!.Category5.split(" ")[0] == "1")) { check_flag.add("c5") } }
66 - memo!!.Category13, 69 + if (i.split("_")[0] == "c6") { all_flag.add("c6"); if ((i.split("_")[1] in memo!!.Category6.split(" ")) || (memo!!.Category6.split(" ")[0] == "1")) { check_flag.add("c6") } }
67 - memo!!.Category14, 70 + if (i.split("_")[0] == "c7") { all_flag.add("c7"); if ((i.split("_")[1] in memo!!.Category7.split(" ")) || (memo!!.Category7.split(" ")[0] == "1")) { check_flag.add("c7") } }
68 - memo!!.Category15, 71 + if (i.split("_")[0] == "c8") { all_flag.add("c8"); if ((i.split("_")[1] in memo!!.Category8.split(" ")) || (memo!!.Category8.split(" ")[0] == "1")) { check_flag.add("c8") } }
69 - memo!!.Category16, 72 + if (i.split("_")[0] == "c9") { all_flag.add("c9"); if ((i.split("_")[1] in memo!!.Category9.split(" ")) || (memo!!.Category9.split(" ")[0] == "1")) { check_flag.add("c9") } }
70 - memo!!.Value, 73 + if (i.split("_")[0] == "c10") { all_flag.add("c10"); if ((i.split("_")[1] in memo!!.Category10.split(" ")) || (memo!!.Category10.split(" ")[0] == "1")) { check_flag.add("c10") } }
71 - memo!!.D_day 74 + if (i.split("_")[0] == "c11") { all_flag.add("c11"); if ((i.split("_")[1] in memo!!.Category11.split(" ")) || (memo!!.Category11.split(" ")[0] == "1")) { check_flag.add("c11") } }
72 - ) 75 + if (i.split("_")[0] == "c12") { all_flag.add("c12"); if ((i.split("_")[1] in memo!!.Category12.split(" ")) || (memo!!.Category12.split(" ")[0] == "1")) { check_flag.add("c12") } }
73 - ) 76 + if (i.split("_")[0] == "c13") { all_flag.add("c13"); if ((i.split("_")[1] in memo!!.Category13.split(" ")) || (memo!!.Category13.split(" ")[0] == "1")) { check_flag.add("c13") } }
77 + if (i.split("_")[0] == "c14") { all_flag.add("c14"); if ((i.split("_")[1] in memo!!.Category14.split(" ")) || (memo!!.Category14.split(" ")[0] == "1")) { check_flag.add("c14") } }
78 + if (i.split("_")[0] == "c15") { all_flag.add("c15"); if ((i.split("_")[1] in memo!!.Category15.split(" ")) || (memo!!.Category15.split(" ")[0] == "1")) { check_flag.add("c15") } }
79 + if (i.split("_")[0] == "c16") { all_flag.add("c16"); if ((i.split("_")[1] in memo!!.Category16.split(" ")) || (memo!!.Category16.split(" ")[0] == "1")) { check_flag.add("c16") } }
80 + }
81 +
82 +
83 + var set_all = all_flag.distinct()
84 + var set_check = check_flag.distinct()
85 +
86 +
87 +
88 + if (set_all.size == set_check.size) {
89 +
90 +
91 + if ("4" in memo!!.Category8.split(" ") ||
92 + "5" in memo!!.Category8.split(" ") ||
93 + "6" in memo!!.Category8.split(" ") ||
94 + "7" in memo!!.Category8.split(" ")) {
95 +
96 + policyList.add(
97 + PolicyItem(
98 + ContextCompat.getDrawable(context!!.applicationContext, R.drawable.recommend_default_blue)!!, memo!!.Policy, memo!!.Content, memo!!.Link, memo!!.View, memo!!.Keyword, memo!!.Date, memo!!.Review, memo!!.Score, memo!!.Category1, memo!!.Category2, memo!!.Category3, memo!!.Category4, memo!!.Category5, memo!!.Category6, memo!!.Category7, memo!!.Category8, memo!!.Category9, memo!!.Category10, memo!!.Category11, memo!!.Category12, memo!!.Category13, memo!!.Category14, memo!!.Category15, memo!!.Category16, memo!!.Value, memo!!.D_day
99 + )
100 + )
101 + val adapter = PolicyAdapter(policyList)
102 + policyRecyclerView.adapter = adapter
103 + policyRecyclerView.setItemViewCacheSize((200000000))
104 + }
105 + }
74 } 106 }
75 - val adapter = PolicyAdapter(policyList) 107 + //Toast.makeText(context!!.applicationContext, "총 "+policyList.size.toString()+"개의 추천 정책을 찾았습니다.", Toast.LENGTH_SHORT).show()
76 - policyRecyclerView.adapter = adapter
77 } 108 }
78 }) 109 })
79 } 110 }
......
...@@ -32,9 +32,9 @@ class InputProfilFifthFourActivity : AppCompatActivity() { ...@@ -32,9 +32,9 @@ class InputProfilFifthFourActivity : AppCompatActivity() {
32 tkn = task.result!!.token 32 tkn = task.result!!.token
33 33
34 // Log and toast 34 // Log and toast
35 - val msg = getString(R.string.msg_token_fmt, tkn) 35 + //val msg = getString(R.string.msg_token_fmt, tkn)
36 //Log.d(TAG, msg) 36 //Log.d(TAG, msg)
37 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 37 + //11Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
38 }) 38 })
39 } 39 }
40 40
......
...@@ -33,9 +33,9 @@ class InputProfilFifthOneActivity : AppCompatActivity() { ...@@ -33,9 +33,9 @@ class InputProfilFifthOneActivity : AppCompatActivity() {
33 tkn = task.result!!.token 33 tkn = task.result!!.token
34 34
35 // Log and toast 35 // Log and toast
36 - val msg = getString(R.string.msg_token_fmt, tkn) 36 + //val msg = getString(R.string.msg_token_fmt, tkn)
37 //Log.d(TAG, msg) 37 //Log.d(TAG, msg)
38 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 38 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
39 }) 39 })
40 } 40 }
41 41
......
...@@ -32,9 +32,9 @@ class InputProfilFifthThreeActivity : AppCompatActivity() { ...@@ -32,9 +32,9 @@ class InputProfilFifthThreeActivity : AppCompatActivity() {
32 tkn = task.result!!.token 32 tkn = task.result!!.token
33 33
34 // Log and toast 34 // Log and toast
35 - val msg = getString(R.string.msg_token_fmt, tkn) 35 + //val msg = getString(R.string.msg_token_fmt, tkn)
36 //Log.d(TAG, msg) 36 //Log.d(TAG, msg)
37 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 37 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
38 }) 38 })
39 } 39 }
40 40
......
...@@ -34,9 +34,9 @@ class InputProfilFifthTwoActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilFifthTwoActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
......
...@@ -40,7 +40,8 @@ class InputProfilFirstFiveActivity : AppCompatActivity() { ...@@ -40,7 +40,8 @@ class InputProfilFirstFiveActivity : AppCompatActivity() {
40 // Log and toast 40 // Log and toast
41 val msg = getString(R.string.msg_token_fmt, tkn) 41 val msg = getString(R.string.msg_token_fmt, tkn)
42 //Log.d(TAG, msg) 42 //Log.d(TAG, msg)
43 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 43 + //
44 + // Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
44 }) 45 })
45 } 46 }
46 47
......
...@@ -35,9 +35,9 @@ class InputProfilFirstFourActivity : AppCompatActivity() { ...@@ -35,9 +35,9 @@ class InputProfilFirstFourActivity : AppCompatActivity() {
35 tkn = task.result!!.token 35 tkn = task.result!!.token
36 36
37 // Log and toast 37 // Log and toast
38 - val msg = getString(R.string.msg_token_fmt, tkn) 38 + // val msg = getString(R.string.msg_token_fmt, tkn)
39 //Log.d(TAG, msg) 39 //Log.d(TAG, msg)
40 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 40 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
41 }) 41 })
42 } 42 }
43 43
......
...@@ -46,9 +46,9 @@ class InputProfilFirstOneActivity : AppCompatActivity() { ...@@ -46,9 +46,9 @@ class InputProfilFirstOneActivity : AppCompatActivity() {
46 tkn = task.result!!.token 46 tkn = task.result!!.token
47 47
48 // Log and toast 48 // Log and toast
49 - val msg = getString(R.string.msg_token_fmt, tkn) 49 + //val msg = getString(R.string.msg_token_fmt, tkn)
50 //Log.d(TAG, msg) 50 //Log.d(TAG, msg)
51 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 51 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
52 }) 52 })
53 } 53 }
54 54
......
...@@ -32,9 +32,9 @@ class InputProfilFirstSixActivity : AppCompatActivity() { ...@@ -32,9 +32,9 @@ class InputProfilFirstSixActivity : AppCompatActivity() {
32 tkn = task.result!!.token 32 tkn = task.result!!.token
33 33
34 // Log and toast 34 // Log and toast
35 - val msg = getString(R.string.msg_token_fmt, tkn) 35 + //val msg = getString(R.string.msg_token_fmt, tkn)
36 //Log.d(TAG, msg) 36 //Log.d(TAG, msg)
37 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 37 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
38 }) 38 })
39 } 39 }
40 40
......
...@@ -34,9 +34,9 @@ class InputProfilFirstThreeActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilFirstThreeActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
......
...@@ -34,9 +34,9 @@ class InputProfilFirstTwoActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilFirstTwoActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
...@@ -188,6 +188,7 @@ class InputProfilFirstTwoActivity : AppCompatActivity() { ...@@ -188,6 +188,7 @@ class InputProfilFirstTwoActivity : AppCompatActivity() {
188 editor.commit() 188 editor.commit()
189 editor.putString("first_two","done");editor.commit() 189 editor.putString("first_two","done");editor.commit()
190 190
191 +
191 } 192 }
192 else if((2019-birthdateint)<59){ 193 else if((2019-birthdateint)<59){
193 editor.putInt("c1_6",1) 194 editor.putInt("c1_6",1)
......
...@@ -33,9 +33,9 @@ class InputProfilFourthFiveActivity : AppCompatActivity() { ...@@ -33,9 +33,9 @@ class InputProfilFourthFiveActivity : AppCompatActivity() {
33 tkn = task.result!!.token 33 tkn = task.result!!.token
34 34
35 // Log and toast 35 // Log and toast
36 - val msg = getString(R.string.msg_token_fmt, tkn) 36 + //val msg = getString(R.string.msg_token_fmt, tkn)
37 //Log.d(TAG, msg) 37 //Log.d(TAG, msg)
38 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 38 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
39 }) 39 })
40 } 40 }
41 41
......
...@@ -33,9 +33,9 @@ class InputProfilFourthFourActivity : AppCompatActivity() { ...@@ -33,9 +33,9 @@ class InputProfilFourthFourActivity : AppCompatActivity() {
33 tkn = task.result!!.token 33 tkn = task.result!!.token
34 34
35 // Log and toast 35 // Log and toast
36 - val msg = getString(R.string.msg_token_fmt, tkn) 36 + //val msg = getString(R.string.msg_token_fmt, tkn)
37 //Log.d(TAG, msg) 37 //Log.d(TAG, msg)
38 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 38 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
39 }) 39 })
40 } 40 }
41 41
......
...@@ -34,9 +34,9 @@ class InputProfilFourthOneActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilFourthOneActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
......
...@@ -33,9 +33,9 @@ class InputProfilFourthThreeActivity : AppCompatActivity() { ...@@ -33,9 +33,9 @@ class InputProfilFourthThreeActivity : AppCompatActivity() {
33 tkn = task.result!!.token 33 tkn = task.result!!.token
34 34
35 // Log and toast 35 // Log and toast
36 - val msg = getString(R.string.msg_token_fmt, tkn) 36 + //val msg = getString(R.string.msg_token_fmt, tkn)
37 //Log.d(TAG, msg) 37 //Log.d(TAG, msg)
38 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 38 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
39 }) 39 })
40 } 40 }
41 41
......
...@@ -34,9 +34,9 @@ class InputProfilFourthTwoActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilFourthTwoActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
......
...@@ -32,9 +32,9 @@ class InputProfilSecondOneActivity : AppCompatActivity() { ...@@ -32,9 +32,9 @@ class InputProfilSecondOneActivity : AppCompatActivity() {
32 tkn = task.result!!.token 32 tkn = task.result!!.token
33 33
34 // Log and toast 34 // Log and toast
35 - val msg = getString(R.string.msg_token_fmt, tkn) 35 + //val msg = getString(R.string.msg_token_fmt, tkn)
36 //Log.d(TAG, msg) 36 //Log.d(TAG, msg)
37 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 37 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
38 }) 38 })
39 } 39 }
40 40
......
...@@ -37,9 +37,9 @@ class InputProfilSecondThreeActivity : AppCompatActivity() { ...@@ -37,9 +37,9 @@ class InputProfilSecondThreeActivity : AppCompatActivity() {
37 tkn = task.result!!.token 37 tkn = task.result!!.token
38 38
39 // Log and toast 39 // Log and toast
40 - val msg = getString(R.string.msg_token_fmt, tkn) 40 + //val msg = getString(R.string.msg_token_fmt, tkn)
41 //Log.d(TAG, msg) 41 //Log.d(TAG, msg)
42 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 42 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
43 }) 43 })
44 } 44 }
45 45
......
...@@ -39,7 +39,7 @@ class InputProfilSecondTwoActivity : AppCompatActivity() { ...@@ -39,7 +39,7 @@ class InputProfilSecondTwoActivity : AppCompatActivity() {
39 // Log and toast 39 // Log and toast
40 val msg = getString(R.string.msg_token_fmt, tkn) 40 val msg = getString(R.string.msg_token_fmt, tkn)
41 //Log.d(TAG, msg) 41 //Log.d(TAG, msg)
42 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 42 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
43 }) 43 })
44 } 44 }
45 45
......
...@@ -39,9 +39,9 @@ class InputProfilThirdFiveActivity : AppCompatActivity() { ...@@ -39,9 +39,9 @@ class InputProfilThirdFiveActivity : AppCompatActivity() {
39 tkn = task.result!!.token 39 tkn = task.result!!.token
40 40
41 // Log and toast 41 // Log and toast
42 - val msg = getString(R.string.msg_token_fmt, tkn) 42 + //val msg = getString(R.string.msg_token_fmt, tkn)
43 //Log.d(TAG, msg) 43 //Log.d(TAG, msg)
44 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 44 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
45 }) 45 })
46 } 46 }
47 47
......
...@@ -34,9 +34,9 @@ class InputProfilThirdFourActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilThirdFourActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
......
...@@ -33,9 +33,9 @@ class InputProfilThirdOneActivity : AppCompatActivity() { ...@@ -33,9 +33,9 @@ class InputProfilThirdOneActivity : AppCompatActivity() {
33 tkn = task.result!!.token 33 tkn = task.result!!.token
34 34
35 // Log and toast 35 // Log and toast
36 - val msg = getString(R.string.msg_token_fmt, tkn) 36 + //val msg = getString(R.string.msg_token_fmt, tkn)
37 //Log.d(TAG, msg) 37 //Log.d(TAG, msg)
38 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 38 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
39 }) 39 })
40 } 40 }
41 41
......
...@@ -32,9 +32,9 @@ class InputProfilThirdThreeActivity : AppCompatActivity() { ...@@ -32,9 +32,9 @@ class InputProfilThirdThreeActivity : AppCompatActivity() {
32 tkn = task.result!!.token 32 tkn = task.result!!.token
33 33
34 // Log and toast 34 // Log and toast
35 - val msg = getString(R.string.msg_token_fmt, tkn) 35 + //val msg = getString(R.string.msg_token_fmt, tkn)
36 //Log.d(TAG, msg) 36 //Log.d(TAG, msg)
37 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 37 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
38 }) 38 })
39 } 39 }
40 40
......
...@@ -34,9 +34,9 @@ class InputProfilThirdTwoActivity : AppCompatActivity() { ...@@ -34,9 +34,9 @@ class InputProfilThirdTwoActivity : AppCompatActivity() {
34 tkn = task.result!!.token 34 tkn = task.result!!.token
35 35
36 // Log and toast 36 // Log and toast
37 - val msg = getString(R.string.msg_token_fmt, tkn) 37 + //val msg = getString(R.string.msg_token_fmt, tkn)
38 //Log.d(TAG, msg) 38 //Log.d(TAG, msg)
39 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 39 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
40 }) 40 })
41 } 41 }
42 42
......
...@@ -32,6 +32,7 @@ import androidx.core.app.ComponentActivity.ExtraData ...@@ -32,6 +32,7 @@ import androidx.core.app.ComponentActivity.ExtraData
32 import androidx.core.content.ContextCompat.getSystemService 32 import androidx.core.content.ContextCompat.getSystemService
33 import android.icu.lang.UCharacter.GraphemeClusterBreak.T 33 import android.icu.lang.UCharacter.GraphemeClusterBreak.T
34 import androidx.core.view.size 34 import androidx.core.view.size
35 +import kotlinx.android.synthetic.main.fragment_a.*
35 36
36 data class MemoItemRecom( 37 data class MemoItemRecom(
37 val Policy : String = "", 38 val Policy : String = "",
...@@ -62,7 +63,6 @@ data class MemoItemRecom( ...@@ -62,7 +63,6 @@ data class MemoItemRecom(
62 val D_day : String = "" 63 val D_day : String = ""
63 ) 64 )
64 65
65 -
66 class RecommendActivity : AppCompatActivity() { 66 class RecommendActivity : AppCompatActivity() {
67 67
68 private val adapter by lazy { MainAdapter(supportFragmentManager) } 68 private val adapter by lazy { MainAdapter(supportFragmentManager) }
...@@ -87,108 +87,7 @@ class RecommendActivity : AppCompatActivity() { ...@@ -87,108 +87,7 @@ class RecommendActivity : AppCompatActivity() {
87 bottomNavigationView.selectedItemId = R.id.bottomRecommend 87 bottomNavigationView.selectedItemId = R.id.bottomRecommend
88 bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) 88 bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
89 89
90 -/* 90 + vpMainActivity.setCurrentItem(intent.getIntExtra("key", 0))
91 - val policyList = ArrayList<PolicyItem>()
92 -
93 - if (intent.hasExtra("key")) {
94 - //textView.text = intent.getStringExtra("key") 텍뷰추가하면 인텐트로 값넘기는거 보임
95 -
96 - // startAt(intent.getStringExtra("key")).endAt(intent.getStringExtra("key")+"\uf8ff")
97 - recomdatabase.orderByChild("View").addListenerForSingleValueEvent(object : ValueEventListener {
98 - override fun onCancelled(p0: DatabaseError) {
99 - Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
100 - }
101 - override fun onDataChange(dataSnapshot: DataSnapshot) {
102 - for (memoSnapshot in dataSnapshot.children){
103 - val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
104 -
105 - policyList.add(
106 - PolicyItem(
107 - ContextCompat.getDrawable(this@RecommendActivity, R.drawable.recommend_default_blue)!!,
108 - memo!!.Policy,
109 - memo.Content,
110 - memo.Link,
111 - memo.View,
112 - memo.Keyword,
113 - memo.Date,
114 - memo.Review,
115 - memo.Score,
116 - memo.Category1,
117 - memo.Category2,
118 - memo.Category3,
119 - memo.Category4,
120 - memo.Category5,
121 - memo.Category6,
122 - memo.Category7,
123 - memo.Category8,
124 - memo.Category9,
125 - memo.Category10,
126 - memo.Category11,
127 - memo.Category12,
128 - memo.Category13,
129 - memo.Category14,
130 - memo.Category15,
131 - memo.Category16,
132 - memo.Value,
133 - memo.D_day
134 - )
135 - )
136 - }
137 - //val adapter = PolicyAdapter(policyList)
138 - //policyRecyclerView.adapter = adapter
139 - }
140 - })
141 -
142 - } else {
143 - //Toast.makeText(this, "putExtra value not found", Toast.LENGTH_SHORT).show()
144 -
145 - recomdatabase.orderByChild("View").addListenerForSingleValueEvent(object :
146 - ValueEventListener {
147 - override fun onCancelled(p0: DatabaseError) {
148 - Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
149 - }
150 - override fun onDataChange(dataSnapshot: DataSnapshot) {
151 - for (memoSnapshot in dataSnapshot.children){
152 - val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
153 -
154 - policyList.add(
155 - PolicyItem(
156 - ContextCompat.getDrawable(this@RecommendActivity, R.drawable.recommend_default_blue)!!,
157 - memo!!.Policy,
158 - memo!!.Content,
159 - memo!!.Link,
160 - memo!!.View,
161 - memo!!.Keyword,
162 - memo!!.Date,
163 - memo!!.Review,
164 - memo!!.Score,
165 - memo!!.Category1,
166 - memo!!.Category2,
167 - memo!!.Category3,
168 - memo!!.Category4,
169 - memo!!.Category5,
170 - memo!!.Category6,
171 - memo!!.Category7,
172 - memo!!.Category8,
173 - memo!!.Category9,
174 - memo!!.Category10,
175 - memo!!.Category11,
176 - memo!!.Category12,
177 - memo!!.Category13,
178 - memo!!.Category14,
179 - memo!!.Category15,
180 - memo!!.Category16,
181 - memo!!.Value,
182 - memo!!.D_day
183 - )
184 - )
185 - }
186 - //val adapter = PolicyAdapter(policyList)
187 - //policyRecyclerView.adapter = adapter
188 - }
189 - })
190 - }
191 -*/
192 91
193 // 1. 툴바 사용 설정 92 // 1. 툴바 사용 설정
194 setSupportActionBar(toolbar) 93 setSupportActionBar(toolbar)
...@@ -201,6 +100,7 @@ class RecommendActivity : AppCompatActivity() { ...@@ -201,6 +100,7 @@ class RecommendActivity : AppCompatActivity() {
201 //val bottomNavigation: BottomNavigationView =findViewById(R.id.bottomNavigation) 100 //val bottomNavigation: BottomNavigationView =findViewById(R.id.bottomNavigation)
202 //bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) 101 //bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener)
203 ////bottom navigation view operation end 2 102 ////bottom navigation view operation end 2
103 +
204 } 104 }
205 // 3.툴바 메뉴 버튼을 설정 105 // 3.툴바 메뉴 버튼을 설정
206 override fun onCreateOptionsMenu(menu: Menu?): Boolean { 106 override fun onCreateOptionsMenu(menu: Menu?): Boolean {
......
...@@ -26,8 +26,6 @@ import androidx.core.content.ContextCompat.getSystemService ...@@ -26,8 +26,6 @@ import androidx.core.content.ContextCompat.getSystemService
26 import android.icu.lang.UCharacter.GraphemeClusterBreak.T 26 import android.icu.lang.UCharacter.GraphemeClusterBreak.T
27 27
28 28
29 -
30 -
31 data class MemoItem( 29 data class MemoItem(
32 val Target : String = "", 30 val Target : String = "",
33 val Policy : String = "", 31 val Policy : String = "",
...@@ -106,10 +104,13 @@ class SearchActivity : AppCompatActivity() { ...@@ -106,10 +104,13 @@ class SearchActivity : AppCompatActivity() {
106 } 104 }
107 } 105 }
108 106
107 + //중복 제거
108 + var set_key =key.distinct()
109 +
109 no_search.setVisibility(View.GONE) 110 no_search.setVisibility(View.GONE)
110 policy_scroll_view.setVisibility(View.VISIBLE) 111 policy_scroll_view.setVisibility(View.VISIBLE)
111 112
112 - for (i in key) { 113 + for (i in set_key) {
113 val key_query = database.orderByChild("Policy").equalTo("$i") 114 val key_query = database.orderByChild("Policy").equalTo("$i")
114 key_query.addListenerForSingleValueEvent(object : ValueEventListener { 115 key_query.addListenerForSingleValueEvent(object : ValueEventListener {
115 override fun onDataChange(dataSnapshot: DataSnapshot) { 116 override fun onDataChange(dataSnapshot: DataSnapshot) {
...@@ -120,7 +121,7 @@ class SearchActivity : AppCompatActivity() { ...@@ -120,7 +121,7 @@ class SearchActivity : AppCompatActivity() {
120 121
121 searchList.add( 122 searchList.add(
122 SearchItem( 123 SearchItem(
123 - ContextCompat.getDrawable(this@SearchActivity, R.drawable.image01)!!, memo!!.Policy 124 + ContextCompat.getDrawable(this@SearchActivity, R.drawable._wello_2)!!, memo!!.Policy
124 ) 125 )
125 ) 126 )
126 } 127 }
......
...@@ -18,15 +18,15 @@ class SettingActivity : AppCompatActivity() { ...@@ -18,15 +18,15 @@ class SettingActivity : AppCompatActivity() {
18 var editTextHello = findViewById(R.id.editText2) as EditText 18 var editTextHello = findViewById(R.id.editText2) as EditText
19 Log.d(TAG, "Subscribing to weather topic") 19 Log.d(TAG, "Subscribing to weather topic")
20 // [START subscribe_topics] 20 // [START subscribe_topics]
21 - Toast.makeText(this, editTextHello.text.toString(), Toast.LENGTH_SHORT).show() 21 + //Toast.makeText(this, editTextHello.text.toString(), Toast.LENGTH_SHORT).show()
22 FirebaseMessaging.getInstance().subscribeToTopic(editTextHello.text.toString()) 22 FirebaseMessaging.getInstance().subscribeToTopic(editTextHello.text.toString())
23 .addOnCompleteListener { task -> 23 .addOnCompleteListener { task ->
24 var msg = getString(R.string.msg_subscribed) 24 var msg = getString(R.string.msg_subscribed)
25 if (!task.isSuccessful) { 25 if (!task.isSuccessful) {
26 msg = getString(R.string.msg_subscribe_failed) 26 msg = getString(R.string.msg_subscribe_failed)
27 } 27 }
28 - Log.d(TAG, msg) 28 + //Log.d(TAG, msg)
29 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 29 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
30 } 30 }
31 // [END subscribe_topics] 31 // [END subscribe_topics]
32 } 32 }
......
...@@ -40,32 +40,32 @@ class SignInActivity : AppCompatActivity() { ...@@ -40,32 +40,32 @@ class SignInActivity : AppCompatActivity() {
40 40
41 kyoyookButton.setOnClickListener { 41 kyoyookButton.setOnClickListener {
42 val intent = Intent(this, RecommendActivity::class.java) 42 val intent = Intent(this, RecommendActivity::class.java)
43 - intent.putExtra("key","kyoyook") 43 + intent.putExtra("key",1)
44 startActivity(intent) 44 startActivity(intent)
45 } 45 }
46 koyongButton.setOnClickListener { 46 koyongButton.setOnClickListener {
47 val intent = Intent(this, RecommendActivity::class.java) 47 val intent = Intent(this, RecommendActivity::class.java)
48 - intent.putExtra("key","koyong") 48 + intent.putExtra("key",2)
49 startActivity(intent) 49 startActivity(intent)
50 } 50 }
51 joogeoButton.setOnClickListener { 51 joogeoButton.setOnClickListener {
52 val intent = Intent(this, RecommendActivity::class.java) 52 val intent = Intent(this, RecommendActivity::class.java)
53 - intent.putExtra("key","joogeo") 53 + intent.putExtra("key",3)
54 startActivity(intent) 54 startActivity(intent)
55 } 55 }
56 geongangButton.setOnClickListener { 56 geongangButton.setOnClickListener {
57 val intent = Intent(this, RecommendActivity::class.java) 57 val intent = Intent(this, RecommendActivity::class.java)
58 - intent.putExtra("key","geongang") 58 + intent.putExtra("key",4)
59 startActivity(intent) 59 startActivity(intent)
60 } 60 }
61 seominButton.setOnClickListener { 61 seominButton.setOnClickListener {
62 val intent = Intent(this, RecommendActivity::class.java) 62 val intent = Intent(this, RecommendActivity::class.java)
63 - intent.putExtra("key","seomin") 63 + intent.putExtra("key",5)
64 startActivity(intent) 64 startActivity(intent)
65 } 65 }
66 moonhwaButton.setOnClickListener { 66 moonhwaButton.setOnClickListener {
67 val intent = Intent(this, RecommendActivity::class.java) 67 val intent = Intent(this, RecommendActivity::class.java)
68 - intent.putExtra("key","moonhwa") 68 + intent.putExtra("key",6)
69 startActivity(intent) 69 startActivity(intent)
70 } 70 }
71 // 네비게이션 뷰 포커스 맞추는 코드 71 // 네비게이션 뷰 포커스 맞추는 코드
......
...@@ -58,9 +58,9 @@ class SignUpActivity : AppCompatActivity() { ...@@ -58,9 +58,9 @@ class SignUpActivity : AppCompatActivity() {
58 tkn = task.result!!.token 58 tkn = task.result!!.token
59 59
60 // Log and toast 60 // Log and toast
61 - val msg = getString(R.string.msg_token_fmt, tkn) 61 + //val msg = getString(R.string.msg_token_fmt, tkn)
62 - Log.d(TAG, msg) 62 + //Log.d(TAG, msg)
63 - Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show() 63 + //Toast.makeText(baseContext, msg, Toast.LENGTH_SHORT).show()
64 }) 64 })
65 } 65 }
66 //pushing code end 2 66 //pushing code end 2
......

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

14.5 KB | W: | H:

29 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
81 android:layout_height="wrap_content" 81 android:layout_height="wrap_content"
82 android:layout_marginLeft="16dp" 82 android:layout_marginLeft="16dp"
83 android:layout_marginTop="5dp" 83 android:layout_marginTop="5dp"
84 - android:layout_marginRight="5dp" 84 + android:layout_marginRight="3dp"
85 android:ellipsize="end" 85 android:ellipsize="end"
86 android:textSize="14dp" /> 86 android:textSize="14dp" />
87 87
......
...@@ -39,8 +39,21 @@ ...@@ -39,8 +39,21 @@
39 android:layout_width="match_parent" 39 android:layout_width="match_parent"
40 android:layout_height="500dp" 40 android:layout_height="500dp"
41 android:layout_weight="1" 41 android:layout_weight="1"
42 + android:visibility="visible"
42 app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" 43 app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
43 - tools:listitem="@layout/item_policy" /> 44 + tools:listitem="@layout/item_policy">
45 +
46 + </androidx.recyclerview.widget.RecyclerView>
47 +
48 + <ImageView
49 + android:id="@+id/no_favor"
50 + android:layout_width="match_parent"
51 + android:layout_height="wrap_content"
52 + android:layout_gravity="center_horizontal|center_vertical"
53 + android:layout_weight="1"
54 + android:contentDescription="img"
55 + android:visibility="gone"
56 + app:srcCompat="@drawable/no_favorlist" />
44 57
45 <FrameLayout 58 <FrameLayout
46 android:layout_width="match_parent" 59 android:layout_width="match_parent"
......
...@@ -74,13 +74,13 @@ ...@@ -74,13 +74,13 @@
74 android:layout_marginLeft="15dp" 74 android:layout_marginLeft="15dp"
75 android:layout_marginTop="15dp" 75 android:layout_marginTop="15dp"
76 android:layout_marginRight="15dp" 76 android:layout_marginRight="15dp"
77 - android:layout_marginBottom="2dp"
78 android:orientation="vertical"> 77 android:orientation="vertical">
79 78
80 <TextView 79 <TextView
81 android:id="@+id/textView10" 80 android:id="@+id/textView10"
82 android:layout_width="match_parent" 81 android:layout_width="match_parent"
83 android:layout_height="wrap_content" 82 android:layout_height="wrap_content"
83 + android:paddingLeft="14dp"
84 android:text="분야별 복지정책" 84 android:text="분야별 복지정책"
85 android:textSize="18dp" 85 android:textSize="18dp"
86 android:textStyle="bold" /> 86 android:textStyle="bold" />
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
107 android:orientation="horizontal"> 107 android:orientation="horizontal">
108 108
109 <LinearLayout 109 <LinearLayout
110 + android:id="@+id/btn1"
110 android:layout_width="wrap_content" 111 android:layout_width="wrap_content"
111 android:layout_height="wrap_content" 112 android:layout_height="wrap_content"
112 android:layout_gravity="center" 113 android:layout_gravity="center"
...@@ -138,6 +139,7 @@ ...@@ -138,6 +139,7 @@
138 </LinearLayout> 139 </LinearLayout>
139 140
140 <LinearLayout 141 <LinearLayout
142 + android:id="@+id/btn2"
141 android:layout_width="wrap_content" 143 android:layout_width="wrap_content"
142 android:layout_height="wrap_content" 144 android:layout_height="wrap_content"
143 android:layout_gravity="center" 145 android:layout_gravity="center"
...@@ -169,6 +171,7 @@ ...@@ -169,6 +171,7 @@
169 </LinearLayout> 171 </LinearLayout>
170 172
171 <LinearLayout 173 <LinearLayout
174 + android:id="@+id/btn3"
172 android:layout_width="wrap_content" 175 android:layout_width="wrap_content"
173 android:layout_height="wrap_content" 176 android:layout_height="wrap_content"
174 android:layout_gravity="center" 177 android:layout_gravity="center"
...@@ -207,6 +210,7 @@ ...@@ -207,6 +210,7 @@
207 android:orientation="horizontal"></LinearLayout> 210 android:orientation="horizontal"></LinearLayout>
208 211
209 <LinearLayout 212 <LinearLayout
213 + android:id="@+id/btn4"
210 android:layout_width="match_parent" 214 android:layout_width="match_parent"
211 android:layout_height="wrap_content" 215 android:layout_height="wrap_content"
212 android:layout_weight="1" 216 android:layout_weight="1"
...@@ -245,6 +249,7 @@ ...@@ -245,6 +249,7 @@
245 </LinearLayout> 249 </LinearLayout>
246 250
247 <LinearLayout 251 <LinearLayout
252 + android:id="@+id/btn5"
248 android:layout_width="wrap_content" 253 android:layout_width="wrap_content"
249 android:layout_height="wrap_content" 254 android:layout_height="wrap_content"
250 android:layout_gravity="center" 255 android:layout_gravity="center"
...@@ -276,6 +281,7 @@ ...@@ -276,6 +281,7 @@
276 </LinearLayout> 281 </LinearLayout>
277 282
278 <LinearLayout 283 <LinearLayout
284 + android:id="@+id/btn6"
279 android:layout_width="wrap_content" 285 android:layout_width="wrap_content"
280 android:layout_height="wrap_content" 286 android:layout_height="wrap_content"
281 android:layout_gravity="center" 287 android:layout_gravity="center"
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
10 10
11 <ImageView 11 <ImageView
12 android:id="@+id/searchIcon" 12 android:id="@+id/searchIcon"
13 - android:layout_width="100dp" 13 + android:layout_width="70dp"
14 - android:layout_height="wrap_content" 14 + android:layout_height="70dp"
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"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
26 android:ellipsize="end" 26 android:ellipsize="end"
27 android:gravity="center_horizontal|left|center_vertical" 27 android:gravity="center_horizontal|left|center_vertical"
28 android:maxLines="1" 28 android:maxLines="1"
29 - android:paddingLeft="4dp" 29 + android:paddingLeft="10dp"
30 android:paddingRight="7dp" 30 android:paddingRight="7dp"
31 android:text="dfefef" 31 android:text="dfefef"
32 android:textSize="20sp" /> 32 android:textSize="20sp" />
......
...@@ -80,10 +80,11 @@ ...@@ -80,10 +80,11 @@
80 android:layout_width="278dp" 80 android:layout_width="278dp"
81 android:layout_height="278dp" 81 android:layout_height="278dp"
82 android:layout_gravity="center_horizontal" 82 android:layout_gravity="center_horizontal"
83 + android:layout_marginBottom="200dp"
83 android:layout_weight="1" 84 android:layout_weight="1"
84 android:contentDescription="img" 85 android:contentDescription="img"
85 - android:visibility="gone" 86 + android:src="@drawable/not_matching"
86 - app:srcCompat="@drawable/not_matching" /> 87 + android:visibility="gone" />
87 88
88 <LinearLayout 89 <LinearLayout
89 android:id="@+id/hashtag_linear" 90 android:id="@+id/hashtag_linear"
...@@ -129,14 +130,14 @@ ...@@ -129,14 +130,14 @@
129 130
130 <com.google.android.material.chip.ChipGroup 131 <com.google.android.material.chip.ChipGroup
131 android:layout_width="match_parent" 132 android:layout_width="match_parent"
132 - android:layout_height="wrap_content"> 133 + android:layout_height="wrap_content"
134 + android:layout_marginBottom="20dp">
133 135
134 <com.google.android.material.chip.Chip 136 <com.google.android.material.chip.Chip
135 style="@style/Widget.MaterialComponents.Chip.Choice" 137 style="@style/Widget.MaterialComponents.Chip.Choice"
136 android:layout_width="wrap_content" 138 android:layout_width="wrap_content"
137 android:layout_height="wrap_content" 139 android:layout_height="wrap_content"
138 - android:layout_marginRight="5dp" 140 + android:layout_marginRight="7dp"
139 - android:layout_marginBottom="5dp"
140 android:checkable="false" 141 android:checkable="false"
141 android:text="# 장애인" 142 android:text="# 장애인"
142 android:textAppearance="@style/TextAppearance.AppCompat" 143 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -147,8 +148,7 @@ ...@@ -147,8 +148,7 @@
147 style="@style/Widget.MaterialComponents.Chip.Choice" 148 style="@style/Widget.MaterialComponents.Chip.Choice"
148 android:layout_width="wrap_content" 149 android:layout_width="wrap_content"
149 android:layout_height="wrap_content" 150 android:layout_height="wrap_content"
150 - android:layout_marginRight="5dp" 151 + android:layout_marginRight="7dp"
151 - android:layout_marginBottom="5dp"
152 android:checkable="false" 152 android:checkable="false"
153 android:text="# 한부모" 153 android:text="# 한부모"
154 android:textAppearance="@style/TextAppearance.AppCompat" 154 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
160 style="@style/Widget.MaterialComponents.Chip.Choice" 160 style="@style/Widget.MaterialComponents.Chip.Choice"
161 android:layout_width="wrap_content" 161 android:layout_width="wrap_content"
162 android:layout_height="wrap_content" 162 android:layout_height="wrap_content"
163 - android:layout_marginBottom="5dp" 163 + android:layout_marginRight="7dp"
164 android:checkable="false" 164 android:checkable="false"
165 android:text="# 다문화" 165 android:text="# 다문화"
166 android:textAppearance="@style/TextAppearance.AppCompat" 166 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -168,15 +168,22 @@ ...@@ -168,15 +168,22 @@
168 app:chipBackgroundColor="#FFFFFF" /> 168 app:chipBackgroundColor="#FFFFFF" />
169 </com.google.android.material.chip.ChipGroup> 169 </com.google.android.material.chip.ChipGroup>
170 170
171 + <TextView
172 + android:id="@+id/textView13"
173 + android:layout_width="wrap_content"
174 + android:layout_height="2dp" />
175 +
171 <com.google.android.material.chip.ChipGroup 176 <com.google.android.material.chip.ChipGroup
172 android:layout_width="match_parent" 177 android:layout_width="match_parent"
173 - android:layout_height="wrap_content"> 178 + android:layout_height="wrap_content"
179 + android:layout_marginLeft="10dp"
180 + android:layout_marginTop="10dp">
174 181
175 <com.google.android.material.chip.Chip 182 <com.google.android.material.chip.Chip
176 style="@style/Widget.MaterialComponents.Chip.Choice" 183 style="@style/Widget.MaterialComponents.Chip.Choice"
177 android:layout_width="wrap_content" 184 android:layout_width="wrap_content"
178 android:layout_height="wrap_content" 185 android:layout_height="wrap_content"
179 - android:layout_marginRight="5dp" 186 + android:layout_marginRight="7dp"
180 android:checkable="false" 187 android:checkable="false"
181 android:text="# 저소득층" 188 android:text="# 저소득층"
182 android:textAppearance="@style/TextAppearance.AppCompat" 189 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -188,6 +195,7 @@ ...@@ -188,6 +195,7 @@
188 style="@style/Widget.MaterialComponents.Chip.Choice" 195 style="@style/Widget.MaterialComponents.Chip.Choice"
189 android:layout_width="wrap_content" 196 android:layout_width="wrap_content"
190 android:layout_height="wrap_content" 197 android:layout_height="wrap_content"
198 + android:layout_marginRight="7dp"
191 android:checkable="false" 199 android:checkable="false"
192 android:text="# 임신/출산" 200 android:text="# 임신/출산"
193 android:textAppearance="@style/TextAppearance.AppCompat" 201 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -214,14 +222,14 @@ ...@@ -214,14 +222,14 @@
214 222
215 <com.google.android.material.chip.ChipGroup 223 <com.google.android.material.chip.ChipGroup
216 android:layout_width="match_parent" 224 android:layout_width="match_parent"
217 - android:layout_height="wrap_content"> 225 + android:layout_height="wrap_content"
226 + android:layout_marginBottom="20dp">
218 227
219 <com.google.android.material.chip.Chip 228 <com.google.android.material.chip.Chip
220 style="@style/Widget.MaterialComponents.Chip.Choice" 229 style="@style/Widget.MaterialComponents.Chip.Choice"
221 android:layout_width="wrap_content" 230 android:layout_width="wrap_content"
222 android:layout_height="wrap_content" 231 android:layout_height="wrap_content"
223 - android:layout_marginRight="5dp" 232 + android:layout_marginRight="7dp"
224 - android:layout_marginBottom="5dp"
225 android:checkable="false" 233 android:checkable="false"
226 android:text="# 아동" 234 android:text="# 아동"
227 android:textAppearance="@style/TextAppearance.AppCompat" 235 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -232,8 +240,7 @@ ...@@ -232,8 +240,7 @@
232 style="@style/Widget.MaterialComponents.Chip.Choice" 240 style="@style/Widget.MaterialComponents.Chip.Choice"
233 android:layout_width="wrap_content" 241 android:layout_width="wrap_content"
234 android:layout_height="wrap_content" 242 android:layout_height="wrap_content"
235 - android:layout_marginRight="5dp" 243 + android:layout_marginRight="7dp"
236 - android:layout_marginBottom="5dp"
237 android:checkable="false" 244 android:checkable="false"
238 android:text="# 청소년" 245 android:text="# 청소년"
239 android:textAppearance="@style/TextAppearance.AppCompat" 246 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -245,7 +252,7 @@ ...@@ -245,7 +252,7 @@
245 style="@style/Widget.MaterialComponents.Chip.Choice" 252 style="@style/Widget.MaterialComponents.Chip.Choice"
246 android:layout_width="wrap_content" 253 android:layout_width="wrap_content"
247 android:layout_height="wrap_content" 254 android:layout_height="wrap_content"
248 - android:layout_marginBottom="5dp" 255 + android:layout_marginRight="7dp"
249 android:checkable="false" 256 android:checkable="false"
250 android:text="# 청년" 257 android:text="# 청년"
251 android:textAppearance="@style/TextAppearance.AppCompat" 258 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -253,15 +260,21 @@ ...@@ -253,15 +260,21 @@
253 app:chipBackgroundColor="#FFFFFF" /> 260 app:chipBackgroundColor="#FFFFFF" />
254 </com.google.android.material.chip.ChipGroup> 261 </com.google.android.material.chip.ChipGroup>
255 262
263 + <TextView
264 + android:id="@+id/textView14"
265 + android:layout_width="wrap_content"
266 + android:layout_height="2dp" />
267 +
256 <com.google.android.material.chip.ChipGroup 268 <com.google.android.material.chip.ChipGroup
257 android:layout_width="match_parent" 269 android:layout_width="match_parent"
258 - android:layout_height="wrap_content"> 270 + android:layout_height="wrap_content"
271 + android:layout_marginLeft="10dp">
259 272
260 <com.google.android.material.chip.Chip 273 <com.google.android.material.chip.Chip
261 style="@style/Widget.MaterialComponents.Chip.Choice" 274 style="@style/Widget.MaterialComponents.Chip.Choice"
262 android:layout_width="wrap_content" 275 android:layout_width="wrap_content"
263 android:layout_height="wrap_content" 276 android:layout_height="wrap_content"
264 - android:layout_marginRight="5dp" 277 + android:layout_marginRight="7dp"
265 android:checkable="false" 278 android:checkable="false"
266 android:text="# 중장년" 279 android:text="# 중장년"
267 android:textAppearance="@style/TextAppearance.AppCompat" 280 android:textAppearance="@style/TextAppearance.AppCompat"
...@@ -273,6 +286,7 @@ ...@@ -273,6 +286,7 @@
273 style="@style/Widget.MaterialComponents.Chip.Choice" 286 style="@style/Widget.MaterialComponents.Chip.Choice"
274 android:layout_width="wrap_content" 287 android:layout_width="wrap_content"
275 android:layout_height="wrap_content" 288 android:layout_height="wrap_content"
289 + android:layout_marginRight="7dp"
276 android:checkable="false" 290 android:checkable="false"
277 android:text="# 노년" 291 android:text="# 노년"
278 android:textAppearance="@style/TextAppearance.AppCompat" 292 android:textAppearance="@style/TextAppearance.AppCompat"
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@color/ic_launcher_real_background"/>
4 + <foreground android:drawable="@mipmap/ic_launcher_real_foreground"/>
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@color/ic_launcher_real2_background"/>
4 + <foreground android:drawable="@mipmap/ic_launcher_real2_foreground"/>
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@color/ic_launcher_real2_background"/>
4 + <foreground android:drawable="@mipmap/ic_launcher_real2_foreground"/>
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3 + <background android:drawable="@color/ic_launcher_real_background"/>
4 + <foreground android:drawable="@mipmap/ic_launcher_real_foreground"/>
5 +</adaptive-icon>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<resources>
3 + <color name="ic_launcher_real2_background">#FFFFFF</color>
4 +</resources>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<resources>
3 + <color name="ic_launcher_real_background">#FFFFFF</color>
4 +</resources>
...\ No newline at end of file ...\ No newline at end of file