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
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")
}
}
})
......
......@@ -30,6 +30,10 @@ class InfoActivity : AppCompatActivity() {
//temp
InfoButtonLaw.setOnClickListener {
var intent = Intent(this, SettingActivity::class.java)
startActivity(intent)
}
//pushing test start
InfoButtonSettings.setOnClickListener {
......
......@@ -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) {
......

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 @@
android:src="@drawable/toolbar_logo" />
</androidx.appcompat.widget.Toolbar>
<ImageView
android:id="@+id/policyImageDetail"
android:layout_width="match_parent"
android:layout_height="200dp"
tools:srcCompat="@tools:sample/avatars" />
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="450dp"
android:orientation="horizontal">
android:layout_height="match_parent"
android:fillViewport="true"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
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"
<ImageView
android:id="@+id/policyImageDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView" />
android:layout_height="200dp"
android:scaleType="fitXY"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/policyTitleDetail"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextView" />
<RatingBar
android:id="@+id/policyScoreDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/policyDdayDetail"
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:layout_marginLeft="11dp"
android:layout_marginBottom="5dp"
android:text="Textw"
android:textSize="30sp" />
<RatingBar
android:id="@+id/policyScoreDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/policyFavorDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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>
<TextView
android:id="@+id/policyFavorDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
</LinearLayout>
</ScrollView>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -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="620dp"
android:layout_marginBottom="131dp"
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
......