신기성

1121 merging

......@@ -41,6 +41,6 @@ def policy_hash_reader():
for r in rdr:
policy_dict[r[0]] = r[1]
#policy_hash_writer(policies)
policy_hash_reader()
policy_db_reader()
policy_hash_writer(policies)
#policy_hash_reader()
#policy_db_reader()
......
......@@ -82,7 +82,7 @@ class DetailActivity : AppCompatActivity() {
detailDday.text=memo!!.D_day
detailTitle.text=memo!!.Policy
detailScore.rating=4.toFloat()
detailFavor.text= " " + memo!!.Keyword
detailFavor.text= memo!!.Keyword
val web : WebView = findViewById(R.id.policy_context)
val summary : String = memo!!.Content
......
......@@ -18,11 +18,18 @@ import androidx.core.content.ContextCompat.startActivity
import androidx.viewpager.widget.ViewPager
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.snackbar.Snackbar
import com.google.firebase.database.FirebaseDatabase
import com.google.firebase.messaging.FirebaseMessaging
import kotlinx.android.synthetic.main.activity_signin.*
import kotlinx.android.synthetic.main.dialog_example.*
class SignInActivity : AppCompatActivity() {
val user_db = FirebaseDatabase.getInstance("https://wello-topic.firebaseio.com/").reference
private fun writeNewUser(Topic : String) {
user_db.child(Topic).setValue(1)/// .setValue(user)
}
internal lateinit var viewpager : ViewPager
////bottom navigation view operation start 1
lateinit var bottomBar: ActionBar
......@@ -88,7 +95,26 @@ class SignInActivity : AppCompatActivity() {
startActivity(intent)
}
.setNegativeButton("다음에 하기") { dialogInterface, i ->
editor.clear()
//editor.clear()
if(prof.getString("existing_topic","c1_1c2_1c3_1c4_1c5_1c6_1c7_1c8_1c9_1c10_1c11_1c12_1c13_1c14_1c15_1c16_1")!="c1_1c2_1c3_1c4_1c5_1c6_1c7_1c8_1c9_1c10_1c11_1c12_1c13_1c14_1c15_1c16_1"){
/*
FirebaseMessaging.getInstance().unsubscribeFromTopic(prof.getString("existing_topic","none").toString())
FirebaseMessaging.getInstance().subscribeToTopic(user_topic).addOnCompleteListener { task ->
if (!task.isSuccessful) { } // 성공
}
writeNewUser(user_topic) // db에 쓰기
editor.putString("existing_topic",user_topic)
editor.commit()
*/
}else{
FirebaseMessaging.getInstance().subscribeToTopic("c1_1c2_1c3_1c4_1c5_1c6_1c7_1c8_1c9_1c10_1c11_1c12_1c13_1c14_1c15_1c16_1").addOnCompleteListener { task ->
if (!task.isSuccessful) { } // 성공
}
writeNewUser("c1_1c2_1c3_1c4_1c5_1c6_1c7_1c8_1c9_1c10_1c11_1c12_1c13_1c14_1c15_1c16_1") // db에 쓰기
editor.putString("existing_topic","c1_1c2_1c3_1c4_1c5_1c6_1c7_1c8_1c9_1c10_1c11_1c12_1c13_1c14_1c15_1c16_1")
editor.commit()
}
}
.show()
......
......@@ -12,8 +12,8 @@ class ViewPagerAdapter(private val context : Context) : PagerAdapter() {
private var layoutInflater : LayoutInflater? = null
val Image = arrayOf(
R.drawable.event1,
R.drawable.event2,
R.drawable.event_1,
R.drawable.event_2,
R.drawable.image01
)
......
......@@ -39,6 +39,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:background="@drawable/round_ratangle"
android:elevation="3dp"
......@@ -71,22 +72,42 @@
android:background="@drawable/broken_rectangle"
android:gravity="center"
android:textColor="#FFF"
android:textSize="18sp" />
android:textSize="18dp" />
<TextView
android:id="@+id/policyFavorDetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="5dp"
android:ellipsize="end" />
android:layout_marginRight="5dp"
android:ellipsize="end"
android:textSize="14dp" />
<TextView
android:id="@+id/policyTitleDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:layout_marginBottom="4dp"
android:textSize="30sp" />
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textSize="24dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="5dp"
android:gravity="center"
android:text=" (Beta)"
android:textColor="#29ABE2"
android:textSize="14dp" />
<RatingBar
android:id="@+id/policyScoreDetail"
......@@ -101,6 +122,8 @@
android:transformPivotX="0dp"
android:transformPivotY="0dp" />
</LinearLayout>
<WebView
android:id="@+id/policy_context"
android:layout_width="match_parent"
......@@ -109,23 +132,28 @@
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/gradation"
android:orientation="horizontal"></LinearLayout>
<FrameLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="5dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.2"
android:background="#FFFFFF"
android:gravity="center"
android:orientation="horizontal">
......
......@@ -161,36 +161,36 @@
android:gravity="left|center_vertical"
android:paddingLeft="33dp"
android:text="설정"
android:textSize="20dp" />
android:textSize="18dp" />
<Button
android:id="@+id/InfoButtonNotice"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:background="#FFF"
style="?android:attr/borderlessButtonStyle"
android:drawableLeft="@drawable/_alert"
android:drawablePadding="22dp"
android:gravity="left|center_vertical"
android:paddingLeft="33dp"
android:text="공지사항"
android:textSize="20dp" />
android:textSize="18dp" />
<Button
android:id="@+id/InfoButtonFAQ"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:background="#FFF"
android:elevation="0dp"
style="?android:attr/borderlessButtonStyle"
android:drawableLeft="@drawable/help"
android:drawablePadding="22dp"
android:elevation="0dp"
android:gravity="left|center_vertical"
android:paddingLeft="33dp"
android:text="자주 묻는 질문"
android:textSize="20dp" />
android:textSize="18dp" />
</LinearLayout>
......
......@@ -148,14 +148,6 @@
android:orientation="vertical">
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(*필수항목)"
android:textColor="#29ABE2"
android:textSize="13dp" />
<TextView
android:id="@+id/explainTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -148,14 +148,6 @@
android:orientation="vertical">
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(*필수항목)"
android:textColor="#29ABE2"
android:textSize="13dp" />
<TextView
android:id="@+id/explainTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -148,14 +148,6 @@
android:orientation="vertical">
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(*필수항목)"
android:textColor="#29ABE2"
android:textSize="13dp" />
<TextView
android:id="@+id/explainTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -148,14 +148,6 @@
android:orientation="vertical">
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(*필수항목)"
android:textColor="#29ABE2"
android:textSize="13dp" />
<TextView
android:id="@+id/explainTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -148,14 +148,6 @@
android:orientation="vertical">
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(*필수항목)"
android:textColor="#29ABE2"
android:textSize="13dp" />
<TextView
android:id="@+id/explainTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -71,8 +71,29 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="2dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="분야별 복지정책"
android:textSize="18dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="15dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
android:layout_weight="1"
android:background="@drawable/edgemaking"
android:gravity="center"
......
......@@ -141,7 +141,7 @@
android:text="# 장애인"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Choice"
......@@ -153,7 +153,7 @@
android:text="# 한부모"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
<com.google.android.material.chip.Chip
......@@ -165,7 +165,7 @@
android:text="# 다문화"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
</com.google.android.material.chip.ChipGroup>
<com.google.android.material.chip.ChipGroup
......@@ -181,7 +181,7 @@
android:text="# 저소득층"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF"
app:chipBackgroundColor="#FFFFFF"
app:chipIcon="@drawable/image01" />
<com.google.android.material.chip.Chip
......@@ -192,7 +192,7 @@
android:text="# 임신/출산"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
</com.google.android.material.chip.ChipGroup>
</com.google.android.material.chip.ChipGroup>
......@@ -226,7 +226,7 @@
android:text="# 아동"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
<com.google.android.material.chip.Chip
style="@style/Widget.MaterialComponents.Chip.Choice"
......@@ -238,7 +238,7 @@
android:text="# 청소년"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
<com.google.android.material.chip.Chip
......@@ -250,7 +250,7 @@
android:text="# 청년"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
</com.google.android.material.chip.ChipGroup>
<com.google.android.material.chip.ChipGroup
......@@ -266,7 +266,7 @@
android:text="# 중장년"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF"
app:chipBackgroundColor="#FFFFFF"
app:chipIcon="@drawable/image01" />
<com.google.android.material.chip.Chip
......@@ -277,7 +277,7 @@
android:text="# 노년"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="16dp"
app:chipBackgroundColor="#C6FFFFFF" />
app:chipBackgroundColor="#FFFFFF" />
</com.google.android.material.chip.ChipGroup>
</com.google.android.material.chip.ChipGroup>
......