신기성

profile design

......@@ -178,6 +178,12 @@ class FavoritesActivity : AppCompatActivity() {
else
Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
back_pressed = System.currentTimeMillis()
val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
editor.putBoolean("popupdone?",false)
editor.commit()
}
......
......@@ -75,6 +75,12 @@ class InfoActivity : AppCompatActivity() {
else
Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
back_pressed = System.currentTimeMillis()
val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
editor.putBoolean("popupdone?",false)
editor.commit()
}
......
......@@ -223,6 +223,12 @@ class RecommendActivity : AppCompatActivity() {
else
Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
back_pressed = System.currentTimeMillis()
val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
editor.putBoolean("popupdone?",false)
editor.commit()
}
private fun update_policy_view(policy_id: String, View_count: Int) {
......
......@@ -29,6 +29,36 @@ class SignInActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_signin)
kyoyookButton.setOnClickListener {
val intent = Intent(this, RecommendActivity::class.java)
intent.putExtra("key","kyoyook")
startActivity(intent)
}
koyongButton.setOnClickListener {
val intent = Intent(this, RecommendActivity::class.java)
intent.putExtra("key","koyong")
startActivity(intent)
}
joogeoButton.setOnClickListener {
val intent = Intent(this, RecommendActivity::class.java)
intent.putExtra("key","joogeo")
startActivity(intent)
}
geongangButton.setOnClickListener {
val intent = Intent(this, RecommendActivity::class.java)
intent.putExtra("key","geongang")
startActivity(intent)
}
seominButton.setOnClickListener {
val intent = Intent(this, RecommendActivity::class.java)
intent.putExtra("key","seomin")
startActivity(intent)
}
moonhwaButton.setOnClickListener {
val intent = Intent(this, RecommendActivity::class.java)
intent.putExtra("key","moonhwa")
startActivity(intent)
}
// 네비게이션 뷰 포커스 맞추는 코드
val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation) as BottomNavigationView
bottomNavigationView.selectedItemId = R.id.bottomHome
......@@ -45,26 +75,34 @@ class SignInActivity : AppCompatActivity() {
dialogView.findViewById<TextView>(R.id.dialogTitle).text="프로필을 입력해주세요!"
dialogView.findViewById<TextView>(R.id.dialogContent1).text="정확한 정책 추천을 얻으려면\n더 많은 프로필 정보가 필요해요!"
builder.setView(dialogView)
.setPositiveButton("지금 할게요 :)") { dialogInterface, i ->
//mainTv.text = dialogText.text.toString()
//mainRb.rating = dialogRatingBar.rating
/* 확인일 때 main의 View의 값에 dialog View에 있는 값을 적용 */
if(prof.getBoolean("popupdone?",false)==false){
builder.setView(dialogView)
.setPositiveButton("지금 할게요 :)") { dialogInterface, i ->
//mainTv.text = dialogText.text.toString()
//mainRb.rating = dialogRatingBar.rating
/* 확인일 때 main의 View의 값에 dialog View에 있는 값을 적용 */
val intent = Intent(this, InputProfilFirstOneActivity::class.java)
startActivity(intent)
}
.setNegativeButton("다음에 하기") { dialogInterface, i ->
editor.clear()
}
.show()
//여기서부터 점찍고 설정
.questionImage.visibility=GONE
val intent = Intent(this, InputProfilFirstOneActivity::class.java)
startActivity(intent)
}
.setNegativeButton("다음에 하기") { dialogInterface, i ->
editor.clear()
editor.putBoolean("popupdone?",true)
editor.commit()
}else{
}
.show()
//여기서부터 점찍고 설정
.questionImage.visibility=GONE
}
//팝업창 끝
//팝업창 끝
/*
val policyFieldList = ArrayList<PolicyFieldItem>()
policyFieldList.add(
......@@ -107,7 +145,7 @@ class SignInActivity : AppCompatActivity() {
val adapter = PolicyFieldAdapter(policyFieldList)
policyFieldRecyclerView.adapter = adapter
*/
viewpager = findViewById(R.id.welcomeViewPager) as ViewPager
val viewpageradapter = ViewPagerAdapter(this)
viewpager.adapter = viewpageradapter
......@@ -145,6 +183,12 @@ class SignInActivity : AppCompatActivity() {
else
Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
back_pressed = System.currentTimeMillis()
val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
val editor: SharedPreferences.Editor=prof.edit()
editor.putBoolean("popupdone?",false)
editor.commit()
}
// 4.툴바 메뉴 버튼이 클릭 됐을 때 콜백
......
......@@ -12,6 +12,11 @@
android:color="#dcdcdc" />
<solid android:color="#FFF" />
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>
</item>
......
......@@ -22,26 +22,38 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
tools:srcCompat="@tools:sample/avatars"
android:background="@drawable/inputlogo"/>
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/inputlogo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_weight="2"
android:orientation="vertical"></LinearLayout>
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="WELLO는 프로필을 기반으로 동작해요\n더 정확한 맞춤형 결과를 위해 프로필을 입력해주세요!" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<Button
......@@ -56,10 +68,5 @@
android:textSize="20dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_weight="3"
android:orientation="vertical"></LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......