Merge branch 'master' of http://khuhub.khu.ac.kr/2014104141/WELLO
Showing
19 changed files
with
459 additions
and
107 deletions
sample_data.csv
0 → 100644
This diff could not be displayed because it is too large.
... | @@ -34,7 +34,7 @@ dependencies { | ... | @@ -34,7 +34,7 @@ dependencies { |
34 | implementation 'com.google.android.gms:play-services-auth:17.0.0' | 34 | implementation 'com.google.android.gms:play-services-auth:17.0.0' |
35 | implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05' | 35 | implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05' |
36 | implementation 'com.android.support:appcompat-v7:27.1.1' | 36 | implementation 'com.android.support:appcompat-v7:27.1.1' |
37 | - implementation 'com.android.support:design:27.1.1' | 37 | + implementation 'com.android.support:design:28.0.0' |
38 | 38 | ||
39 | implementation 'com.google.firebase:firebase-analytics:17.2.0' | 39 | implementation 'com.google.firebase:firebase-analytics:17.2.0' |
40 | implementation 'com.google.firebase:firebase-messaging:20.0.0' | 40 | implementation 'com.google.firebase:firebase-messaging:20.0.0' | ... | ... |
... | @@ -42,7 +42,7 @@ | ... | @@ -42,7 +42,7 @@ |
42 | <activity android:name=".SignInActivity" /> | 42 | <activity android:name=".SignInActivity" /> |
43 | <activity android:name=".SignUpActivity" /> | 43 | <activity android:name=".SignUpActivity" /> |
44 | <activity android:name=".MainActivity" /> | 44 | <activity android:name=".MainActivity" /> |
45 | - <activity android:name=".SearchActivity" /> | 45 | + <activity android:name=".SearchActivity" android:windowSoftInputMode="adjustNothing"/> |
46 | <activity | 46 | <activity |
47 | android:name=".SplashActivity" | 47 | android:name=".SplashActivity" |
48 | android:theme="@style/SplashTheme"> | 48 | android:theme="@style/SplashTheme"> | ... | ... |
... | @@ -7,6 +7,7 @@ import android.util.Half.toFloat | ... | @@ -7,6 +7,7 @@ import android.util.Half.toFloat |
7 | import android.view.Menu | 7 | import android.view.Menu |
8 | import android.view.MenuItem | 8 | import android.view.MenuItem |
9 | import android.view.View | 9 | import android.view.View |
10 | +import android.webkit.WebView | ||
10 | import android.widget.ImageView | 11 | import android.widget.ImageView |
11 | import android.widget.RatingBar | 12 | import android.widget.RatingBar |
12 | import android.widget.TextView | 13 | import android.widget.TextView |
... | @@ -26,12 +27,19 @@ import kotlinx.android.synthetic.main.activity_recommend.* | ... | @@ -26,12 +27,19 @@ import kotlinx.android.synthetic.main.activity_recommend.* |
26 | import kotlinx.android.synthetic.main.activity_signin.* | 27 | import kotlinx.android.synthetic.main.activity_signin.* |
27 | import kotlinx.android.synthetic.main.activity_signin.toolbar | 28 | import kotlinx.android.synthetic.main.activity_signin.toolbar |
28 | import kotlinx.android.synthetic.main.search.* | 29 | import kotlinx.android.synthetic.main.search.* |
30 | +import androidx.core.app.ComponentActivity.ExtraData | ||
31 | +import androidx.core.content.ContextCompat.getSystemService | ||
32 | +import android.icu.lang.UCharacter.GraphemeClusterBreak.T | ||
33 | +import android.net.Uri | ||
34 | +import android.view.MotionEvent | ||
35 | + | ||
29 | 36 | ||
30 | data class MemoItemDetail( | 37 | data class MemoItemDetail( |
31 | val Target : String = "", | 38 | val Target : String = "", |
32 | val Policy : String = "", | 39 | val Policy : String = "", |
33 | val Content : String = "", | 40 | val Content : String = "", |
34 | - val Link : String = "" | 41 | + val Link : String = "", |
42 | + val Date : String = "상시" | ||
35 | ) | 43 | ) |
36 | 44 | ||
37 | class DetailActivity : AppCompatActivity() { | 45 | class DetailActivity : AppCompatActivity() { |
... | @@ -59,18 +67,48 @@ class DetailActivity : AppCompatActivity() { | ... | @@ -59,18 +67,48 @@ class DetailActivity : AppCompatActivity() { |
59 | 67 | ||
60 | var detailImage: ImageView =findViewById(R.id.policyImageDetail) | 68 | var detailImage: ImageView =findViewById(R.id.policyImageDetail) |
61 | var detailDday: TextView =findViewById(R.id.policyDdayDetail) | 69 | var detailDday: TextView =findViewById(R.id.policyDdayDetail) |
62 | - var detailHost: TextView =findViewById(R.id.policyHostDetail) | ||
63 | var detailTitle: TextView =findViewById(R.id.policyTitleDetail) | 70 | var detailTitle: TextView =findViewById(R.id.policyTitleDetail) |
64 | var detailScore: RatingBar =findViewById(R.id.policyScoreDetail) | 71 | var detailScore: RatingBar =findViewById(R.id.policyScoreDetail) |
65 | var detailFavor: TextView =findViewById(R.id.policyFavorDetail) | 72 | var detailFavor: TextView =findViewById(R.id.policyFavorDetail) |
66 | 73 | ||
67 | detailImage.setImageResource(R.drawable.image01) | 74 | detailImage.setImageResource(R.drawable.image01) |
68 | - detailDday.text=memo!!.Policy | 75 | + detailDday.text=memo!!.Date |
69 | - detailHost.text=memo!!.Policy | ||
70 | detailTitle.text=memo!!.Policy | 76 | detailTitle.text=memo!!.Policy |
71 | detailScore.rating=4.toFloat() | 77 | detailScore.rating=4.toFloat() |
72 | detailFavor.text="0" | 78 | detailFavor.text="0" |
73 | 79 | ||
80 | + val web : WebView = findViewById(R.id.policy_context) | ||
81 | + val summary : String = memo!!.Content | ||
82 | + web.loadData(summary, "text/html", "UTF-8") | ||
83 | + | ||
84 | + | ||
85 | + | ||
86 | + | ||
87 | + val mOnNavigationItemSelectedListener=BottomNavigationView.OnNavigationItemSelectedListener{item-> | ||
88 | + when (item.itemId){ | ||
89 | + | ||
90 | + R.id.shareBtn ->{ | ||
91 | + //val intent = Intent(this, SignInActivity::class.java) | ||
92 | + //startActivity(intent) | ||
93 | + //return@OnNavigationItemSelectedListener true | ||
94 | + } | ||
95 | + R.id.favorBtn ->{ | ||
96 | + | ||
97 | + } | ||
98 | + R.id.linkBtn ->{ | ||
99 | + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(memo.Link)) | ||
100 | + startActivity(intent) | ||
101 | + } | ||
102 | + } | ||
103 | + false | ||
104 | + } | ||
105 | + ////bottom navigation view operation start 2 | ||
106 | + bottomBar=supportActionBar!! | ||
107 | + val bottomNavigation: BottomNavigationView =findViewById(R.id.bottomNavigation) | ||
108 | + bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | ||
109 | + ////bottom navigation view operation end 2 | ||
110 | + | ||
111 | + | ||
74 | } | 112 | } |
75 | } | 113 | } |
76 | }) | 114 | }) |
... | @@ -81,7 +119,6 @@ class DetailActivity : AppCompatActivity() { | ... | @@ -81,7 +119,6 @@ class DetailActivity : AppCompatActivity() { |
81 | } | 119 | } |
82 | 120 | ||
83 | 121 | ||
84 | - | ||
85 | // 1. 툴바 사용 설정 | 122 | // 1. 툴바 사용 설정 |
86 | setSupportActionBar(toolbar) | 123 | setSupportActionBar(toolbar) |
87 | 124 | ||
... | @@ -90,11 +127,6 @@ class DetailActivity : AppCompatActivity() { | ... | @@ -90,11 +127,6 @@ class DetailActivity : AppCompatActivity() { |
90 | supportActionBar!!.setHomeAsUpIndicator(R.drawable.return_page) // 왼쪽 버튼 아이콘 설정 | 127 | supportActionBar!!.setHomeAsUpIndicator(R.drawable.return_page) // 왼쪽 버튼 아이콘 설정 |
91 | supportActionBar!!.setDisplayShowTitleEnabled(false) // 타이틀 안보이게 하기 | 128 | supportActionBar!!.setDisplayShowTitleEnabled(false) // 타이틀 안보이게 하기 |
92 | 129 | ||
93 | - ////bottom navigation view operation start 2 | ||
94 | - bottomBar=supportActionBar!! | ||
95 | - val bottomNavigation: BottomNavigationView =findViewById(R.id.bottomNavigation) | ||
96 | - bottomNavigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener) | ||
97 | - ////bottom navigation view operation end 2 | ||
98 | 130 | ||
99 | } | 131 | } |
100 | // 3.툴바 메뉴 버튼을 설정 | 132 | // 3.툴바 메뉴 버튼을 설정 |
... | @@ -120,34 +152,7 @@ class DetailActivity : AppCompatActivity() { | ... | @@ -120,34 +152,7 @@ class DetailActivity : AppCompatActivity() { |
120 | } | 152 | } |
121 | 153 | ||
122 | //bottom navigation view operation start 3 | 154 | //bottom navigation view operation start 3 |
123 | - private val mOnNavigationItemSelectedListener=BottomNavigationView.OnNavigationItemSelectedListener{item-> | ||
124 | - when (item.itemId){ | ||
125 | 155 | ||
126 | - R.id.bottomHome ->{ | ||
127 | - val intent = Intent(this, SignInActivity::class.java) | ||
128 | - startActivity(intent) | ||
129 | - return@OnNavigationItemSelectedListener true | ||
130 | - } | ||
131 | - R.id.bottomRecommend ->{ | ||
132 | - val intent = Intent(this, RecommendActivity::class.java) | ||
133 | - startActivity(intent) | ||
134 | - return@OnNavigationItemSelectedListener true | ||
135 | - } | ||
136 | - R.id.bottomFavorites ->{ | ||
137 | - val intent = Intent(this, FavoritesActivity::class.java) | ||
138 | - startActivity(intent) | ||
139 | - return@OnNavigationItemSelectedListener true | ||
140 | - } | ||
141 | - R.id.bottomInfo ->{ | ||
142 | - val intent = Intent(this, InfoActivity::class.java) | ||
143 | - startActivity(intent) | ||
144 | - return@OnNavigationItemSelectedListener true | ||
145 | - } | ||
146 | - | ||
147 | - | ||
148 | - } | ||
149 | - false | ||
150 | - } | ||
151 | //bottom navigation view operation end 3 | 156 | //bottom navigation view operation end 3 |
152 | 157 | ||
153 | } | 158 | } | ... | ... |
... | @@ -30,6 +30,10 @@ class InfoActivity : AppCompatActivity() { | ... | @@ -30,6 +30,10 @@ class InfoActivity : AppCompatActivity() { |
30 | 30 | ||
31 | //temp | 31 | //temp |
32 | 32 | ||
33 | + InfoButtonLaw.setOnClickListener { | ||
34 | + var intent = Intent(this, SettingActivity::class.java) | ||
35 | + startActivity(intent) | ||
36 | + } | ||
33 | 37 | ||
34 | //pushing test start | 38 | //pushing test start |
35 | InfoButtonSettings.setOnClickListener { | 39 | InfoButtonSettings.setOnClickListener { | ... | ... |
... | @@ -28,7 +28,6 @@ class MainActivity : AppCompatActivity() { | ... | @@ -28,7 +28,6 @@ class MainActivity : AppCompatActivity() { |
28 | super.onCreate(savedInstanceState) | 28 | super.onCreate(savedInstanceState) |
29 | //onboarding start | 29 | //onboarding start |
30 | 30 | ||
31 | - | ||
32 | //onboarding end | 31 | //onboarding end |
33 | setContentView(R.layout.activity_main) | 32 | setContentView(R.layout.activity_main) |
34 | 33 | ||
... | @@ -43,9 +42,6 @@ class MainActivity : AppCompatActivity() { | ... | @@ -43,9 +42,6 @@ class MainActivity : AppCompatActivity() { |
43 | startActivity(intent) | 42 | startActivity(intent) |
44 | } | 43 | } |
45 | 44 | ||
46 | - | ||
47 | - | ||
48 | - | ||
49 | } | 45 | } |
50 | 46 | ||
51 | private fun loginEmail(){ | 47 | private fun loginEmail(){ | ... | ... |
1 | package com.example.vip | 1 | package com.example.vip |
2 | 2 | ||
3 | +import android.content.Context | ||
3 | import android.os.Bundle | 4 | import android.os.Bundle |
4 | import androidx.appcompat.app.AppCompatActivity | 5 | import androidx.appcompat.app.AppCompatActivity |
5 | //import androidx.appcompat.widget.SearchView | 6 | //import androidx.appcompat.widget.SearchView |
6 | -import android.widget.SearchView | ||
7 | -import android.widget.Toast | ||
8 | import androidx.core.app.ComponentActivity.ExtraData | 7 | import androidx.core.app.ComponentActivity.ExtraData |
9 | import androidx.core.content.ContextCompat.getSystemService | 8 | import androidx.core.content.ContextCompat.getSystemService |
10 | import android.icu.lang.UCharacter.GraphemeClusterBreak.T | 9 | import android.icu.lang.UCharacter.GraphemeClusterBreak.T |
11 | import android.view.View | 10 | import android.view.View |
12 | -import android.widget.Button | ||
13 | import android.content.Intent | 11 | import android.content.Intent |
14 | import android.util.Log | 12 | import android.util.Log |
13 | +import android.view.inputmethod.InputMethodManager | ||
14 | +import android.widget.* | ||
15 | import androidx.core.content.ContextCompat | 15 | import androidx.core.content.ContextCompat |
16 | import com.google.firebase.database.* | 16 | import com.google.firebase.database.* |
17 | import com.google.firebase.database.DatabaseReference | 17 | import com.google.firebase.database.DatabaseReference |
... | @@ -35,21 +35,43 @@ class SearchActivity : AppCompatActivity() { | ... | @@ -35,21 +35,43 @@ class SearchActivity : AppCompatActivity() { |
35 | setContentView(R.layout.search) | 35 | setContentView(R.layout.search) |
36 | 36 | ||
37 | val searchList = ArrayList<SearchItem>() | 37 | val searchList = ArrayList<SearchItem>() |
38 | - | 38 | + val no_search : ImageView = findViewById(R.id.no_matching) // 노서치이미지 |
39 | - | ||
40 | 39 | ||
41 | val searchView: SearchView | 40 | val searchView: SearchView |
42 | searchView = findViewById(R.id.searchForm) | 41 | searchView = findViewById(R.id.searchForm) |
42 | + //searchView.onActionViewExpanded(); //new Added line | ||
43 | + searchView.setIconifiedByDefault(false) | ||
44 | + | ||
45 | + fun CloseKeyboard() | ||
46 | + { | ||
47 | + var view = this.currentFocus | ||
48 | + | ||
49 | + if(view != null) | ||
50 | + { | ||
51 | + val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | ||
52 | + inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0) | ||
53 | + } | ||
54 | + } | ||
43 | 55 | ||
44 | searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener { | 56 | searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener { |
45 | override fun onQueryTextSubmit(query: String): Boolean { | 57 | override fun onQueryTextSubmit(query: String): Boolean { |
46 | // 검색 버튼이 눌러졌을 때 이벤트 처리 | 58 | // 검색 버튼이 눌러졌을 때 이벤트 처리 |
59 | + val layout : LinearLayout = findViewById(R.id.hashtag_linear) | ||
60 | + layout.setVisibility(View.GONE) | ||
47 | 61 | ||
62 | + CloseKeyboard() | ||
48 | database.orderByChild("Policy").startAt("$query").endAt("$query"+"\uf8ff").addListenerForSingleValueEvent(object : ValueEventListener { | 63 | database.orderByChild("Policy").startAt("$query").endAt("$query"+"\uf8ff").addListenerForSingleValueEvent(object : ValueEventListener { |
49 | override fun onCancelled(p0: DatabaseError) { | 64 | override fun onCancelled(p0: DatabaseError) { |
50 | Toast.makeText(this@SearchActivity, "실패부분 : $query", Toast.LENGTH_SHORT).show() | 65 | Toast.makeText(this@SearchActivity, "실패부분 : $query", Toast.LENGTH_SHORT).show() |
51 | } | 66 | } |
52 | override fun onDataChange(dataSnapshot: DataSnapshot) { | 67 | override fun onDataChange(dataSnapshot: DataSnapshot) { |
68 | + if (dataSnapshot.exists() == false){ // 값 없을 때 | ||
69 | + no_search.setVisibility(View.VISIBLE) | ||
70 | + } | ||
71 | + else { | ||
72 | + no_search.setVisibility(View.GONE) | ||
73 | + } | ||
74 | + | ||
53 | for (memoSnapshot in dataSnapshot.children){ | 75 | for (memoSnapshot in dataSnapshot.children){ |
54 | val memo = memoSnapshot.getValue(MemoItem::class.java) | 76 | val memo = memoSnapshot.getValue(MemoItem::class.java) |
55 | 77 | ... | ... |
... | @@ -3,6 +3,7 @@ package com.example.vip | ... | @@ -3,6 +3,7 @@ package com.example.vip |
3 | import androidx.appcompat.app.AppCompatActivity | 3 | import androidx.appcompat.app.AppCompatActivity |
4 | import android.os.Bundle | 4 | import android.os.Bundle |
5 | import android.util.Log | 5 | import android.util.Log |
6 | +import android.widget.EditText | ||
6 | import android.widget.Toast | 7 | import android.widget.Toast |
7 | import com.google.firebase.messaging.FirebaseMessaging | 8 | import com.google.firebase.messaging.FirebaseMessaging |
8 | import kotlinx.android.synthetic.main.activity_setting.* | 9 | import kotlinx.android.synthetic.main.activity_setting.* |
... | @@ -14,9 +15,11 @@ class SettingActivity : AppCompatActivity() { | ... | @@ -14,9 +15,11 @@ class SettingActivity : AppCompatActivity() { |
14 | setContentView(R.layout.activity_setting) | 15 | setContentView(R.layout.activity_setting) |
15 | 16 | ||
16 | subscribeButton.setOnClickListener { | 17 | subscribeButton.setOnClickListener { |
18 | + var editTextHello = findViewById(R.id.editText2) as EditText | ||
17 | Log.d(TAG, "Subscribing to weather topic") | 19 | Log.d(TAG, "Subscribing to weather topic") |
18 | // [START subscribe_topics] | 20 | // [START subscribe_topics] |
19 | - FirebaseMessaging.getInstance().subscribeToTopic("news") | 21 | + Toast.makeText(this, editTextHello.text.toString(), Toast.LENGTH_SHORT).show() |
22 | + FirebaseMessaging.getInstance().subscribeToTopic(editTextHello.text.toString()) | ||
20 | .addOnCompleteListener { task -> | 23 | .addOnCompleteListener { task -> |
21 | var msg = getString(R.string.msg_subscribed) | 24 | var msg = getString(R.string.msg_subscribed) |
22 | if (!task.isSuccessful) { | 25 | if (!task.isSuccessful) { | ... | ... |
... | @@ -4,6 +4,7 @@ import android.content.Intent | ... | @@ -4,6 +4,7 @@ import android.content.Intent |
4 | import android.os.Bundle | 4 | import android.os.Bundle |
5 | import android.view.Menu | 5 | import android.view.Menu |
6 | import android.view.MenuItem | 6 | import android.view.MenuItem |
7 | +import android.widget.Toast | ||
7 | import androidx.appcompat.app.ActionBar | 8 | import androidx.appcompat.app.ActionBar |
8 | import androidx.appcompat.app.AppCompatActivity | 9 | import androidx.appcompat.app.AppCompatActivity |
9 | import androidx.core.content.ContextCompat | 10 | import androidx.core.content.ContextCompat |
... | @@ -90,6 +91,20 @@ class SignInActivity : AppCompatActivity() { | ... | @@ -90,6 +91,20 @@ class SignInActivity : AppCompatActivity() { |
90 | return true | 91 | return true |
91 | } | 92 | } |
92 | 93 | ||
94 | + var back_pressed: Long = 0 // 뒤로가기 종료 | ||
95 | + | ||
96 | + override fun onBackPressed() { | ||
97 | + if (back_pressed + 2000 > System.currentTimeMillis()) { | ||
98 | + finishAffinity() | ||
99 | + System.runFinalization() | ||
100 | + System.exit(0) | ||
101 | + } | ||
102 | + //super.onBackPressed() | ||
103 | + else | ||
104 | + Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show() | ||
105 | + back_pressed = System.currentTimeMillis() | ||
106 | + } | ||
107 | + | ||
93 | // 4.툴바 메뉴 버튼이 클릭 됐을 때 콜백 | 108 | // 4.툴바 메뉴 버튼이 클릭 됐을 때 콜백 |
94 | override fun onOptionsItemSelected(item: MenuItem?): Boolean { | 109 | override fun onOptionsItemSelected(item: MenuItem?): Boolean { |
95 | // 클릭된 메뉴 아이템의 아이디 마다 when 구절로 클릭시 동작을 설정한다. | 110 | // 클릭된 메뉴 아이템의 아이디 마다 when 구절로 클릭시 동작을 설정한다. | ... | ... |
13.5 KB
13.5 KB
13.5 KB
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:shape="rectangle" > | ||
4 | + <solid android:color="@android:color/transparent" /> | ||
5 | + <stroke | ||
6 | + android:width="3dp" | ||
7 | + android:color="#C029ABE2" /> | ||
8 | + <corners android:radius="30dp"/> | ||
9 | + <!--<padding | ||
10 | + android:top="8dp"/>--> | ||
11 | + | ||
12 | +</shape> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -34,56 +34,66 @@ | ... | @@ -34,56 +34,66 @@ |
34 | android:src="@drawable/toolbar_logo" /> | 34 | android:src="@drawable/toolbar_logo" /> |
35 | </androidx.appcompat.widget.Toolbar> | 35 | </androidx.appcompat.widget.Toolbar> |
36 | 36 | ||
37 | - | 37 | + <ScrollView |
38 | - <ImageView | ||
39 | - android:id="@+id/policyImageDetail" | ||
40 | - android:layout_width="match_parent" | ||
41 | - android:layout_height="200dp" | ||
42 | - tools:srcCompat="@tools:sample/avatars" /> | ||
43 | - | ||
44 | - <LinearLayout | ||
45 | android:layout_width="match_parent" | 38 | android:layout_width="match_parent" |
46 | - android:layout_height="450dp" | 39 | + android:layout_height="match_parent" |
47 | - android:orientation="horizontal"> | 40 | + android:fillViewport="true" |
41 | + android:layout_weight="1"> | ||
48 | 42 | ||
49 | <LinearLayout | 43 | <LinearLayout |
50 | android:layout_width="match_parent" | 44 | android:layout_width="match_parent" |
51 | - android:layout_height="match_parent" | 45 | + android:layout_height="wrap_content" |
52 | android:orientation="vertical"> | 46 | android:orientation="vertical"> |
53 | 47 | ||
54 | - <TextView | 48 | + <ImageView |
55 | - android:id="@+id/policyDdayDetail" | 49 | + android:id="@+id/policyImageDetail" |
56 | - android:layout_width="match_parent" | ||
57 | - android:layout_height="wrap_content" | ||
58 | - android:text="TextView" /> | ||
59 | - | ||
60 | - <TextView | ||
61 | - android:id="@+id/policyHostDetail" | ||
62 | android:layout_width="match_parent" | 50 | android:layout_width="match_parent" |
63 | - android:layout_height="wrap_content" | 51 | + android:layout_height="200dp" |
64 | - android:text="TextView" /> | 52 | + android:scaleType="fitXY" |
53 | + tools:srcCompat="@tools:sample/avatars" /> | ||
65 | 54 | ||
66 | - <TextView | 55 | + <LinearLayout |
67 | - android:id="@+id/policyTitleDetail" | ||
68 | android:layout_width="match_parent" | 56 | android:layout_width="match_parent" |
69 | - android:layout_height="wrap_content" | 57 | + android:layout_height="match_parent" |
70 | - android:text="TextView" /> | 58 | + android:orientation="vertical"> |
71 | - | 59 | + |
72 | - <RatingBar | 60 | + <TextView |
73 | - android:id="@+id/policyScoreDetail" | 61 | + android:id="@+id/policyDdayDetail" |
74 | - android:layout_width="match_parent" | 62 | + android:layout_width="77dp" |
75 | - android:layout_height="wrap_content" /> | 63 | + android:layout_height="44dp" |
64 | + android:background="#9949ADF9" | ||
65 | + android:gravity="center" | ||
66 | + android:text="TextView" | ||
67 | + android:textColor="#FFF" | ||
68 | + android:textSize="18sp" /> | ||
69 | + | ||
70 | + <TextView | ||
71 | + android:id="@+id/policyTitleDetail" | ||
72 | + android:layout_width="match_parent" | ||
73 | + android:layout_height="wrap_content" | ||
74 | + android:layout_marginLeft="11dp" | ||
75 | + android:layout_marginBottom="5dp" | ||
76 | + android:text="Textw" | ||
77 | + android:textSize="30sp" /> | ||
78 | + | ||
79 | + <RatingBar | ||
80 | + android:id="@+id/policyScoreDetail" | ||
81 | + android:layout_width="wrap_content" | ||
82 | + android:layout_height="wrap_content" /> | ||
83 | + | ||
84 | + <TextView | ||
85 | + android:id="@+id/policyFavorDetail" | ||
86 | + android:layout_width="wrap_content" | ||
87 | + android:layout_height="wrap_content" | ||
88 | + android:text="TextView" /> | ||
89 | + | ||
90 | + <WebView | ||
91 | + android:id="@+id/policy_context" | ||
92 | + android:layout_width="match_parent" | ||
93 | + android:layout_height="wrap_content" /> | ||
94 | + </LinearLayout> | ||
76 | </LinearLayout> | 95 | </LinearLayout> |
77 | - | 96 | + </ScrollView> |
78 | - <TextView | ||
79 | - android:id="@+id/policyFavorDetail" | ||
80 | - android:layout_width="wrap_content" | ||
81 | - android:layout_height="wrap_content" | ||
82 | - android:layout_weight="1" | ||
83 | - android:text="TextView" /> | ||
84 | - | ||
85 | - </LinearLayout> | ||
86 | - | ||
87 | <FrameLayout | 97 | <FrameLayout |
88 | android:layout_width="match_parent" | 98 | android:layout_width="match_parent" |
89 | android:layout_height="wrap_content" | 99 | android:layout_height="wrap_content" |
... | @@ -100,7 +110,7 @@ | ... | @@ -100,7 +110,7 @@ |
100 | app:itemIconTint="#29ABE2" | 110 | app:itemIconTint="#29ABE2" |
101 | app:itemTextColor="#29ABE2" | 111 | app:itemTextColor="#29ABE2" |
102 | app:labelVisibilityMode="labeled" | 112 | app:labelVisibilityMode="labeled" |
103 | - app:menu="@menu/bottom_nav_menu" /> | 113 | + app:menu="@menu/detailpage_navigation" /> |
104 | </FrameLayout> | 114 | </FrameLayout> |
105 | 115 | ||
106 | </LinearLayout> | 116 | </LinearLayout> | ... | ... |
... | @@ -25,15 +25,42 @@ | ... | @@ -25,15 +25,42 @@ |
25 | <ToggleButton | 25 | <ToggleButton |
26 | android:id="@+id/toggleButton" | 26 | android:id="@+id/toggleButton" |
27 | android:layout_width="30dp" | 27 | android:layout_width="30dp" |
28 | - android:layout_height="30dp" | 28 | + android:layout_height="0dp" |
29 | + android:layout_marginTop="81dp" | ||
29 | android:layout_marginEnd="72dp" | 30 | android:layout_marginEnd="72dp" |
30 | - android:layout_marginBottom="620dp" | 31 | + android:layout_marginBottom="131dp" |
31 | android:background="@drawable/toggle_selector" | 32 | android:background="@drawable/toggle_selector" |
32 | android:text="ToggleButton" | 33 | android:text="ToggleButton" |
33 | android:textOff="" | 34 | android:textOff="" |
34 | android:textOn="" | 35 | android:textOn="" |
36 | + app:layout_constraintBottom_toTopOf="@+id/editText2" | ||
37 | + app:layout_constraintEnd_toEndOf="parent" | ||
38 | + app:layout_constraintTop_toTopOf="parent" /> | ||
39 | + | ||
40 | + <TextView | ||
41 | + android:id="@+id/topicname" | ||
42 | + android:layout_width="wrap_content" | ||
43 | + android:layout_height="wrap_content" | ||
44 | + android:layout_marginStart="137dp" | ||
45 | + android:layout_marginTop="180dp" | ||
46 | + android:layout_marginBottom="181dp" | ||
47 | + android:text="TextView" | ||
48 | + app:layout_constraintBottom_toBottomOf="@+id/subscribeButton" | ||
49 | + app:layout_constraintStart_toStartOf="parent" | ||
50 | + app:layout_constraintTop_toTopOf="parent" /> | ||
51 | + | ||
52 | + <EditText | ||
53 | + android:id="@+id/editText2" | ||
54 | + android:layout_width="wrap_content" | ||
55 | + android:layout_height="wrap_content" | ||
56 | + android:layout_marginBottom="444dp" | ||
57 | + android:ems="10" | ||
58 | + android:inputType="textPersonName" | ||
59 | + android:text="Name" | ||
35 | app:layout_constraintBottom_toBottomOf="parent" | 60 | app:layout_constraintBottom_toBottomOf="parent" |
36 | - app:layout_constraintEnd_toEndOf="parent" /> | 61 | + app:layout_constraintEnd_toEndOf="parent" |
62 | + app:layout_constraintStart_toStartOf="parent" | ||
63 | + app:layout_constraintTop_toBottomOf="@+id/toggleButton" /> | ||
37 | 64 | ||
38 | 65 | ||
39 | </androidx.constraintlayout.widget.ConstraintLayout> | 66 | </androidx.constraintlayout.widget.ConstraintLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -2,24 +2,260 @@ | ... | @@ -2,24 +2,260 @@ |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | - android:orientation="vertical" | ||
6 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
7 | - android:layout_height="wrap_content"> | 6 | + android:layout_height="match_parent" |
7 | + android:orientation="vertical" | ||
8 | + android:weightSum="2"> | ||
8 | 9 | ||
9 | - <SearchView | 10 | + <androidx.appcompat.widget.Toolbar |
10 | - android:id="@+id/searchForm" | 11 | + android:id="@+id/toolbar" |
11 | - android:queryHint="복지 정책 입력" | 12 | + android:layout_width="fill_parent" |
12 | - app:showAsAction="always" | 13 | + android:layout_height="wrap_content" |
13 | - android:layout_width="match_parent" | 14 | + android:layout_marginBottom="11dp" |
14 | - android:layout_height="wrap_content" > | 15 | + android:background="#FFF" |
16 | + android:elevation="5dp" | ||
17 | + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | ||
18 | + app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> | ||
15 | 19 | ||
16 | - </SearchView> | 20 | + <TextView |
21 | + android:layout_width="wrap_content" | ||
22 | + android:layout_height="wrap_content" | ||
23 | + android:text="모든 정책 검색" | ||
24 | + android:textSize="20dp" | ||
25 | + android:textColor="#000" | ||
26 | + android:layout_gravity="center" | ||
27 | + android:layout_centerHorizontal="true" /> | ||
28 | + </androidx.appcompat.widget.Toolbar> | ||
17 | 29 | ||
18 | - <androidx.recyclerview.widget.RecyclerView | 30 | + <LinearLayout |
19 | - android:id="@+id/searchRecyclerView" | ||
20 | android:layout_width="match_parent" | 31 | android:layout_width="match_parent" |
21 | - android:layout_height="wrap_content" | 32 | + android:layout_height="match_parent" |
22 | - app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 33 | + android:orientation="vertical"> |
23 | - tools:listitem="@layout/item_search" /> | 34 | + |
35 | + <LinearLayout | ||
36 | + android:layout_width="match_parent" | ||
37 | + android:layout_height="200dp" | ||
38 | + android:layout_weight="1" | ||
39 | + android:orientation="vertical"> | ||
40 | + | ||
41 | + <SearchView | ||
42 | + android:id="@+id/searchForm" | ||
43 | + android:layout_width="match_parent" | ||
44 | + android:layout_height="wrap_content" | ||
45 | + android:layout_marginLeft="9dp" | ||
46 | + android:layout_marginTop="30dp" | ||
47 | + android:layout_marginRight="9dp" | ||
48 | + android:layout_marginBottom="9dp" | ||
49 | + android:background="@drawable/searchview_edge" | ||
50 | + android:focusable="false" | ||
51 | + android:layoutDirection="rtl" | ||
52 | + android:paddingStart="7dp" | ||
53 | + android:queryHint=" 정책명, 대상, 키워드를 입력하세요" | ||
54 | + app:iconifiedByDefault="false" | ||
55 | + app:showAsAction="always" /> | ||
56 | + | ||
57 | + <androidx.recyclerview.widget.RecyclerView | ||
58 | + android:id="@+id/searchRecyclerView" | ||
59 | + android:layout_width="match_parent" | ||
60 | + android:layout_height="match_parent" | ||
61 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||
62 | + tools:listitem="@layout/item_search"> | ||
63 | + | ||
64 | + </androidx.recyclerview.widget.RecyclerView> | ||
65 | + </LinearLayout> | ||
66 | + | ||
67 | + <ImageView | ||
68 | + android:id="@+id/no_matching" | ||
69 | + android:layout_width="match_parent" | ||
70 | + android:layout_height="wrap_content" | ||
71 | + android:layout_gravity="center" | ||
72 | + android:contentDescription="img" | ||
73 | + android:visibility="gone" | ||
74 | + app:srcCompat="@drawable/not_matching" | ||
75 | + tools:srcCompat="@drawable/not_matching" /> | ||
76 | + | ||
77 | + <LinearLayout | ||
78 | + android:id="@+id/hashtag_linear" | ||
79 | + android:layout_width="match_parent" | ||
80 | + android:layout_height="200dp" | ||
81 | + android:layout_weight="1.1" | ||
82 | + android:orientation="vertical"> | ||
83 | + | ||
84 | + <FrameLayout | ||
85 | + android:layout_width="wrap_content" | ||
86 | + android:layout_height="wrap_content"> | ||
87 | + | ||
88 | + <View | ||
89 | + android:id="@+id/view2" | ||
90 | + android:layout_width="match_parent" | ||
91 | + android:layout_height="match_parent" | ||
92 | + android:background="#6629ABE2" /> | ||
93 | + | ||
94 | + <FrameLayout | ||
95 | + android:layout_width="match_parent" | ||
96 | + android:layout_height="match_parent"> | ||
97 | + | ||
98 | + <com.google.android.material.chip.ChipGroup | ||
99 | + android:layout_width="match_parent" | ||
100 | + android:layout_height="wrap_content" | ||
101 | + android:layout_gravity="center|center_horizontal|center_vertical" | ||
102 | + android:layout_marginStart="17dp" | ||
103 | + android:foregroundGravity="center_vertical|center|center_horizontal"> | ||
104 | + | ||
105 | + | ||
106 | + <com.google.android.material.chip.ChipGroup | ||
107 | + android:layout_width="match_parent" | ||
108 | + android:layout_height="wrap_content"> | ||
109 | + | ||
110 | + <TextView | ||
111 | + android:id="@+id/textView" | ||
112 | + android:layout_width="wrap_content" | ||
113 | + android:layout_height="wrap_content" | ||
114 | + android:text="가구상황별" /> | ||
115 | + | ||
116 | + | ||
117 | + <com.google.android.material.chip.ChipGroup | ||
118 | + android:layout_width="match_parent" | ||
119 | + android:layout_height="wrap_content"> | ||
120 | + | ||
121 | + <com.google.android.material.chip.Chip | ||
122 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
123 | + android:layout_width="wrap_content" | ||
124 | + app:chipBackgroundColor="#C6FFFFFF" | ||
125 | + android:layout_height="wrap_content" | ||
126 | + android:layout_marginBottom="5dp" | ||
127 | + android:checkable="false" | ||
128 | + android:text="# 장애인" | ||
129 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
130 | + | ||
131 | + <com.google.android.material.chip.Chip | ||
132 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
133 | + android:layout_width="wrap_content" | ||
134 | + android:layout_height="wrap_content" | ||
135 | + android:layout_marginBottom="5dp" | ||
136 | + android:checkable="false" | ||
137 | + app:chipBackgroundColor="#C6FFFFFF" | ||
138 | + android:text="# 한부모" | ||
139 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
140 | + | ||
141 | + | ||
142 | + <com.google.android.material.chip.Chip | ||
143 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
144 | + android:layout_width="wrap_content" | ||
145 | + android:layout_height="wrap_content" | ||
146 | + android:layout_marginBottom="5dp" | ||
147 | + android:checkable="false" | ||
148 | + app:chipBackgroundColor="#C6FFFFFF" | ||
149 | + android:text="# 다문화" | ||
150 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
151 | + </com.google.android.material.chip.ChipGroup> | ||
152 | + | ||
153 | + <com.google.android.material.chip.ChipGroup | ||
154 | + android:layout_width="match_parent" | ||
155 | + android:layout_height="wrap_content"> | ||
156 | + | ||
157 | + <com.google.android.material.chip.Chip | ||
158 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
159 | + android:layout_width="wrap_content" | ||
160 | + android:layout_height="wrap_content" | ||
161 | + android:checkable="false" | ||
162 | + app:chipBackgroundColor="#C6FFFFFF" | ||
163 | + android:text="# 저소득층" | ||
164 | + android:textAppearance="@style/TextAppearance.AppCompat" | ||
165 | + app:chipIcon="@drawable/image01" /> | ||
166 | + | ||
167 | + <com.google.android.material.chip.Chip | ||
168 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
169 | + android:layout_width="wrap_content" | ||
170 | + android:layout_height="wrap_content" | ||
171 | + android:checkable="false" | ||
172 | + app:chipBackgroundColor="#C6FFFFFF" | ||
173 | + android:text="# 임신/출산" | ||
174 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
175 | + | ||
176 | + </com.google.android.material.chip.ChipGroup> | ||
177 | + </com.google.android.material.chip.ChipGroup> | ||
178 | + | ||
179 | + <com.google.android.material.chip.ChipGroup | ||
180 | + android:layout_width="match_parent" | ||
181 | + android:layout_height="wrap_content" | ||
182 | + android:layout_gravity="center|center_horizontal|center_vertical" | ||
183 | + android:foregroundGravity="center_vertical|center|center_horizontal"> | ||
184 | + | ||
185 | + <TextView | ||
186 | + android:id="@+id/textVㅇiew" | ||
187 | + android:layout_width="wrap_content" | ||
188 | + android:layout_height="wrap_content" | ||
189 | + android:text="\n생애주기별" /> | ||
190 | + | ||
191 | + | ||
192 | + <com.google.android.material.chip.ChipGroup | ||
193 | + android:layout_width="match_parent" | ||
194 | + android:layout_height="wrap_content"> | ||
195 | + | ||
196 | + <com.google.android.material.chip.Chip | ||
197 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
198 | + android:layout_width="wrap_content" | ||
199 | + android:layout_height="wrap_content" | ||
200 | + android:layout_marginBottom="5dp" | ||
201 | + android:checkable="false" | ||
202 | + app:chipBackgroundColor="#C6FFFFFF" | ||
203 | + android:text="# 아동" | ||
204 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
205 | + | ||
206 | + <com.google.android.material.chip.Chip | ||
207 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
208 | + android:layout_width="wrap_content" | ||
209 | + android:layout_height="wrap_content" | ||
210 | + android:layout_marginBottom="5dp" | ||
211 | + android:checkable="false" | ||
212 | + app:chipBackgroundColor="#C6FFFFFF" | ||
213 | + android:text="# 청소년" | ||
214 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
215 | + | ||
216 | + | ||
217 | + <com.google.android.material.chip.Chip | ||
218 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
219 | + android:layout_width="wrap_content" | ||
220 | + android:layout_height="wrap_content" | ||
221 | + android:layout_marginBottom="5dp" | ||
222 | + android:checkable="false" | ||
223 | + app:chipBackgroundColor="#C6FFFFFF" | ||
224 | + android:text="# 청년" | ||
225 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
226 | + </com.google.android.material.chip.ChipGroup> | ||
227 | + | ||
228 | + <com.google.android.material.chip.ChipGroup | ||
229 | + android:layout_width="match_parent" | ||
230 | + android:layout_height="wrap_content"> | ||
231 | + | ||
232 | + <com.google.android.material.chip.Chip | ||
233 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
234 | + android:layout_width="wrap_content" | ||
235 | + android:layout_height="wrap_content" | ||
236 | + android:checkable="false" | ||
237 | + app:chipBackgroundColor="#C6FFFFFF" | ||
238 | + android:text="# 중장년" | ||
239 | + android:textAppearance="@style/TextAppearance.AppCompat" | ||
240 | + app:chipIcon="@drawable/image01" /> | ||
241 | + | ||
242 | + <com.google.android.material.chip.Chip | ||
243 | + style="@style/Widget.MaterialComponents.Chip.Choice" | ||
244 | + android:layout_width="wrap_content" | ||
245 | + android:layout_height="wrap_content" | ||
246 | + android:checkable="false" | ||
247 | + app:chipBackgroundColor="#C6FFFFFF" | ||
248 | + android:text="# 노년" | ||
249 | + android:textAppearance="@style/TextAppearance.AppCompat" /> | ||
250 | + | ||
251 | + </com.google.android.material.chip.ChipGroup> | ||
252 | + </com.google.android.material.chip.ChipGroup> | ||
253 | + </com.google.android.material.chip.ChipGroup> | ||
254 | + | ||
255 | + </FrameLayout> | ||
256 | + | ||
257 | + </FrameLayout> | ||
24 | 258 | ||
259 | + </LinearLayout> | ||
260 | + </LinearLayout> | ||
25 | </LinearLayout> | 261 | </LinearLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
4 | + <item | ||
5 | + android:id="@+id/shareBtn" | ||
6 | + android:enabled="true" | ||
7 | + android:icon="@drawable/home" | ||
8 | + android:title="Share" | ||
9 | + app:showAsAction="ifRoom" /> | ||
10 | + <item | ||
11 | + android:id="@+id/favorBtn" | ||
12 | + android:enabled="true" | ||
13 | + android:icon="@drawable/wish" | ||
14 | + android:title="Heart" | ||
15 | + app:showAsAction="ifRoom" /> | ||
16 | + <item | ||
17 | + android:id="@+id/linkBtn" | ||
18 | + android:enabled="true" | ||
19 | + android:icon="@drawable/instagram" | ||
20 | + android:title="Link" | ||
21 | + app:showAsAction="ifRoom" /> | ||
22 | +</menu> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment