soonmyeong2

detail view activity complete

This diff could not be displayed because it is too large.
...@@ -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
...@@ -31,7 +32,8 @@ data class MemoItemDetail( ...@@ -31,7 +32,8 @@ data class MemoItemDetail(
31 val Target : String = "", 32 val Target : String = "",
32 val Policy : String = "", 33 val Policy : String = "",
33 val Content : String = "", 34 val Content : String = "",
34 - val Link : String = "" 35 + val Link : String = "",
36 + val Date : String = "상시"
35 ) 37 )
36 38
37 class DetailActivity : AppCompatActivity() { 39 class DetailActivity : AppCompatActivity() {
...@@ -59,18 +61,19 @@ class DetailActivity : AppCompatActivity() { ...@@ -59,18 +61,19 @@ class DetailActivity : AppCompatActivity() {
59 61
60 var detailImage: ImageView =findViewById(R.id.policyImageDetail) 62 var detailImage: ImageView =findViewById(R.id.policyImageDetail)
61 var detailDday: TextView =findViewById(R.id.policyDdayDetail) 63 var detailDday: TextView =findViewById(R.id.policyDdayDetail)
62 - var detailHost: TextView =findViewById(R.id.policyHostDetail)
63 var detailTitle: TextView =findViewById(R.id.policyTitleDetail) 64 var detailTitle: TextView =findViewById(R.id.policyTitleDetail)
64 var detailScore: RatingBar =findViewById(R.id.policyScoreDetail) 65 var detailScore: RatingBar =findViewById(R.id.policyScoreDetail)
65 var detailFavor: TextView =findViewById(R.id.policyFavorDetail) 66 var detailFavor: TextView =findViewById(R.id.policyFavorDetail)
66 67
67 detailImage.setImageResource(R.drawable.image01) 68 detailImage.setImageResource(R.drawable.image01)
68 - detailDday.text=memo!!.Policy 69 + detailDday.text=memo!!.Date
69 - detailHost.text=memo!!.Policy
70 detailTitle.text=memo!!.Policy 70 detailTitle.text=memo!!.Policy
71 detailScore.rating=4.toFloat() 71 detailScore.rating=4.toFloat()
72 detailFavor.text="0" 72 detailFavor.text="0"
73 73
74 + val web : WebView = findViewById(R.id.policy_context)
75 + val summary : String = memo!!.Content
76 + web.loadData(summary, "text/html", "UTF-8")
74 } 77 }
75 } 78 }
76 }) 79 })
......
...@@ -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 {
......
...@@ -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) {
......

88.3 KB | W: | H:

193 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

88.3 KB | W: | H:

193 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
...@@ -34,56 +34,67 @@ ...@@ -34,56 +34,67 @@
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 + <ScrollView
38 + android:layout_width="match_parent"
39 + android:layout_height="match_parent"
40 + android:fillViewport="true"
41 + android:layout_weight="1">
42 +
43 + <LinearLayout
44 + android:layout_width="match_parent"
45 + android:layout_height="wrap_content"
46 + android:orientation="vertical">
37 47
38 <ImageView 48 <ImageView
39 android:id="@+id/policyImageDetail" 49 android:id="@+id/policyImageDetail"
40 android:layout_width="match_parent" 50 android:layout_width="match_parent"
41 android:layout_height="200dp" 51 android:layout_height="200dp"
52 + android:scaleType="fitXY"
42 tools:srcCompat="@tools:sample/avatars" /> 53 tools:srcCompat="@tools:sample/avatars" />
43 54
44 <LinearLayout 55 <LinearLayout
45 android:layout_width="match_parent" 56 android:layout_width="match_parent"
46 - android:layout_height="450dp"
47 - android:orientation="horizontal">
48 -
49 - <LinearLayout
50 - android:layout_width="match_parent"
51 android:layout_height="match_parent" 57 android:layout_height="match_parent"
52 android:orientation="vertical"> 58 android:orientation="vertical">
53 59
54 <TextView 60 <TextView
55 android:id="@+id/policyDdayDetail" 61 android:id="@+id/policyDdayDetail"
56 - android:layout_width="match_parent" 62 + android:layout_width="77dp"
57 - android:layout_height="wrap_content" 63 + android:layout_height="44dp"
58 - android:text="TextView" /> 64 + android:background="#9949ADF9"
59 - 65 + android:gravity="center"
60 - <TextView 66 + android:text="TextView"
61 - android:id="@+id/policyHostDetail" 67 + android:textColor="#FFF"
62 - android:layout_width="match_parent" 68 + android:textSize="18sp" />
63 - android:layout_height="wrap_content"
64 - android:text="TextView" />
65 69
66 <TextView 70 <TextView
67 android:id="@+id/policyTitleDetail" 71 android:id="@+id/policyTitleDetail"
68 android:layout_width="match_parent" 72 android:layout_width="match_parent"
69 android:layout_height="wrap_content" 73 android:layout_height="wrap_content"
70 - android:text="TextView" /> 74 + android:layout_marginLeft="11dp"
75 + android:layout_marginBottom="5dp"
76 + android:text="Textw"
77 + android:textSize="30sp" />
71 78
72 <RatingBar 79 <RatingBar
73 android:id="@+id/policyScoreDetail" 80 android:id="@+id/policyScoreDetail"
74 - android:layout_width="match_parent" 81 + android:layout_width="wrap_content"
75 android:layout_height="wrap_content" /> 82 android:layout_height="wrap_content" />
76 - </LinearLayout>
77 83
78 <TextView 84 <TextView
79 android:id="@+id/policyFavorDetail" 85 android:id="@+id/policyFavorDetail"
80 android:layout_width="wrap_content" 86 android:layout_width="wrap_content"
81 android:layout_height="wrap_content" 87 android:layout_height="wrap_content"
82 - android:layout_weight="1"
83 android:text="TextView" /> 88 android:text="TextView" />
84 89
90 + <WebView
91 + android:id="@+id/policy_context"
92 + android:layout_width="match_parent"
93 + android:layout_height="wrap_content"
94 + android:layout_weight="1" />
85 </LinearLayout> 95 </LinearLayout>
86 - 96 + </LinearLayout>
97 + </ScrollView>
87 <FrameLayout 98 <FrameLayout
88 android:layout_width="match_parent" 99 android:layout_width="match_parent"
89 android:layout_height="wrap_content" 100 android:layout_height="wrap_content"
......
...@@ -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
......