Toggle navigation
Toggle navigation
This project
Loading...
Sign in
장연우
/
WELLO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
soonmyeong2
2019-11-09 22:30:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
742cf625a0da03d6a6f606d221723ffe77857405
742cf625
1 parent
834439fe
detail view activity complete
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
27 deletions
sample_data.csv
vip/app/src/main/java/com/example/vip/DetailActivity.kt
vip/app/src/main/java/com/example/vip/InfoActivity.kt
vip/app/src/main/java/com/example/vip/SettingActivity.kt
vip/app/src/main/res/drawable-v24/image01.jpg
vip/app/src/main/res/drawable/image01.jpg
vip/app/src/main/res/layout/activity_detail.xml
vip/app/src/main/res/layout/activity_setting.xml
sample_data.csv
View file @
742cf62
This diff could not be displayed because it is too large.
vip/app/src/main/java/com/example/vip/DetailActivity.kt
View file @
742cf62
...
...
@@ -7,6 +7,7 @@ import android.util.Half.toFloat
import
android.view.Menu
import
android.view.MenuItem
import
android.view.View
import
android.webkit.WebView
import
android.widget.ImageView
import
android.widget.RatingBar
import
android.widget.TextView
...
...
@@ -31,7 +32,8 @@ data class MemoItemDetail(
val
Target
:
String
=
""
,
val
Policy
:
String
=
""
,
val
Content
:
String
=
""
,
val
Link
:
String
=
""
val
Link
:
String
=
""
,
val
Date
:
String
=
"상시"
)
class
DetailActivity
:
AppCompatActivity
()
{
...
...
@@ -59,18 +61,19 @@ class DetailActivity : AppCompatActivity() {
var
detailImage
:
ImageView
=
findViewById
(
R
.
id
.
policyImageDetail
)
var
detailDday
:
TextView
=
findViewById
(
R
.
id
.
policyDdayDetail
)
var
detailHost
:
TextView
=
findViewById
(
R
.
id
.
policyHostDetail
)
var
detailTitle
:
TextView
=
findViewById
(
R
.
id
.
policyTitleDetail
)
var
detailScore
:
RatingBar
=
findViewById
(
R
.
id
.
policyScoreDetail
)
var
detailFavor
:
TextView
=
findViewById
(
R
.
id
.
policyFavorDetail
)
detailImage
.
setImageResource
(
R
.
drawable
.
image01
)
detailDday
.
text
=
memo
!!
.
Policy
detailHost
.
text
=
memo
!!
.
Policy
detailDday
.
text
=
memo
!!
.
Date
detailTitle
.
text
=
memo
!!
.
Policy
detailScore
.
rating
=
4
.
toFloat
()
detailFavor
.
text
=
"0"
val
web
:
WebView
=
findViewById
(
R
.
id
.
policy_context
)
val
summary
:
String
=
memo
!!
.
Content
web
.
loadData
(
summary
,
"text/html"
,
"UTF-8"
)
}
}
})
...
...
vip/app/src/main/java/com/example/vip/InfoActivity.kt
View file @
742cf62
...
...
@@ -30,6 +30,10 @@ class InfoActivity : AppCompatActivity() {
//temp
InfoButtonLaw
.
setOnClickListener
{
var
intent
=
Intent
(
this
,
SettingActivity
::
class
.
java
)
startActivity
(
intent
)
}
//pushing test start
InfoButtonSettings
.
setOnClickListener
{
...
...
vip/app/src/main/java/com/example/vip/SettingActivity.kt
View file @
742cf62
...
...
@@ -3,6 +3,7 @@ package com.example.vip
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.util.Log
import
android.widget.EditText
import
android.widget.Toast
import
com.google.firebase.messaging.FirebaseMessaging
import
kotlinx.android.synthetic.main.activity_setting.*
...
...
@@ -14,9 +15,11 @@ class SettingActivity : AppCompatActivity() {
setContentView
(
R
.
layout
.
activity_setting
)
subscribeButton
.
setOnClickListener
{
var
editTextHello
=
findViewById
(
R
.
id
.
editText2
)
as
EditText
Log
.
d
(
TAG
,
"Subscribing to weather topic"
)
// [START subscribe_topics]
FirebaseMessaging
.
getInstance
().
subscribeToTopic
(
"news"
)
Toast
.
makeText
(
this
,
editTextHello
.
text
.
toString
(),
Toast
.
LENGTH_SHORT
).
show
()
FirebaseMessaging
.
getInstance
().
subscribeToTopic
(
editTextHello
.
text
.
toString
())
.
addOnCompleteListener
{
task
->
var
msg
=
getString
(
R
.
string
.
msg_subscribed
)
if
(!
task
.
isSuccessful
)
{
...
...
vip/app/src/main/res/drawable-v24/image01.jpg
View file @
742cf62
88.3 KB
|
W:
|
H:
193 KB
|
W:
|
H:
2-up
Swipe
Onion skin
vip/app/src/main/res/drawable/image01.jpg
View file @
742cf62
88.3 KB
|
W:
|
H:
193 KB
|
W:
|
H:
2-up
Swipe
Onion skin
vip/app/src/main/res/layout/activity_detail.xml
View file @
742cf62
...
...
@@ -34,56 +34,67 @@
android:src=
"@drawable/toolbar_logo"
/>
</androidx.appcompat.widget.Toolbar>
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fillViewport=
"true"
android:layout_weight=
"1"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/policyImageDetail"
android:layout_width=
"match_parent"
android:layout_height=
"200dp"
android:scaleType=
"fitXY"
tools:srcCompat=
"@tools:sample/avatars"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"450dp"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/policyDdayDetail"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"TextView"
/>
<TextView
android:id=
"@+id/policyHostDetail"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"TextView"
/>
android:layout_width=
"77dp"
android:layout_height=
"44dp"
android:background=
"#9949ADF9"
android:gravity=
"center"
android:text=
"TextView"
android:textColor=
"#FFF"
android:textSize=
"18sp"
/>
<TextView
android:id=
"@+id/policyTitleDetail"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"TextView"
/>
android:layout_marginLeft=
"11dp"
android:layout_marginBottom=
"5dp"
android:text=
"Textw"
android:textSize=
"30sp"
/>
<RatingBar
android:id=
"@+id/policyScoreDetail"
android:layout_width=
"match_par
ent"
android:layout_width=
"wrap_cont
ent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
<TextView
android:id=
"@+id/policyFavorDetail"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"TextView"
/>
<WebView
android:id=
"@+id/policy_context"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
vip/app/src/main/res/layout/activity_setting.xml
View file @
742cf62
...
...
@@ -25,15 +25,42 @@
<ToggleButton
android:id=
"@+id/toggleButton"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"81dp"
android:layout_marginEnd=
"72dp"
android:layout_marginBottom=
"
620
dp"
android:layout_marginBottom=
"
131
dp"
android:background=
"@drawable/toggle_selector"
android:text=
"ToggleButton"
android:textOff=
""
android:textOn=
""
app:layout_constraintBottom_toTopOf=
"@+id/editText2"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/topicname"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"137dp"
android:layout_marginTop=
"180dp"
android:layout_marginBottom=
"181dp"
android:text=
"TextView"
app:layout_constraintBottom_toBottomOf=
"@+id/subscribeButton"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<EditText
android:id=
"@+id/editText2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"444dp"
android:ems=
"10"
android:inputType=
"textPersonName"
android:text=
"Name"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/toggleButton"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment