신기성

profile design

...@@ -178,6 +178,12 @@ class FavoritesActivity : AppCompatActivity() { ...@@ -178,6 +178,12 @@ class FavoritesActivity : AppCompatActivity() {
178 else 178 else
179 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show() 179 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
180 back_pressed = System.currentTimeMillis() 180 back_pressed = System.currentTimeMillis()
181 +
182 + val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
183 + val editor: SharedPreferences.Editor=prof.edit()
184 +
185 + editor.putBoolean("popupdone?",false)
186 + editor.commit()
181 } 187 }
182 188
183 189
......
...@@ -75,6 +75,12 @@ class InfoActivity : AppCompatActivity() { ...@@ -75,6 +75,12 @@ class InfoActivity : AppCompatActivity() {
75 else 75 else
76 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show() 76 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
77 back_pressed = System.currentTimeMillis() 77 back_pressed = System.currentTimeMillis()
78 +
79 + val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
80 + val editor: SharedPreferences.Editor=prof.edit()
81 +
82 + editor.putBoolean("popupdone?",false)
83 + editor.commit()
78 } 84 }
79 85
80 86
......
...@@ -223,6 +223,12 @@ class RecommendActivity : AppCompatActivity() { ...@@ -223,6 +223,12 @@ class RecommendActivity : AppCompatActivity() {
223 else 223 else
224 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show() 224 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
225 back_pressed = System.currentTimeMillis() 225 back_pressed = System.currentTimeMillis()
226 +
227 + val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
228 + val editor: SharedPreferences.Editor=prof.edit()
229 +
230 + editor.putBoolean("popupdone?",false)
231 + editor.commit()
226 } 232 }
227 233
228 private fun update_policy_view(policy_id: String, View_count: Int) { 234 private fun update_policy_view(policy_id: String, View_count: Int) {
......
...@@ -29,6 +29,36 @@ class SignInActivity : AppCompatActivity() { ...@@ -29,6 +29,36 @@ class SignInActivity : AppCompatActivity() {
29 super.onCreate(savedInstanceState) 29 super.onCreate(savedInstanceState)
30 setContentView(R.layout.activity_signin) 30 setContentView(R.layout.activity_signin)
31 31
32 + kyoyookButton.setOnClickListener {
33 + val intent = Intent(this, RecommendActivity::class.java)
34 + intent.putExtra("key","kyoyook")
35 + startActivity(intent)
36 + }
37 + koyongButton.setOnClickListener {
38 + val intent = Intent(this, RecommendActivity::class.java)
39 + intent.putExtra("key","koyong")
40 + startActivity(intent)
41 + }
42 + joogeoButton.setOnClickListener {
43 + val intent = Intent(this, RecommendActivity::class.java)
44 + intent.putExtra("key","joogeo")
45 + startActivity(intent)
46 + }
47 + geongangButton.setOnClickListener {
48 + val intent = Intent(this, RecommendActivity::class.java)
49 + intent.putExtra("key","geongang")
50 + startActivity(intent)
51 + }
52 + seominButton.setOnClickListener {
53 + val intent = Intent(this, RecommendActivity::class.java)
54 + intent.putExtra("key","seomin")
55 + startActivity(intent)
56 + }
57 + moonhwaButton.setOnClickListener {
58 + val intent = Intent(this, RecommendActivity::class.java)
59 + intent.putExtra("key","moonhwa")
60 + startActivity(intent)
61 + }
32 // 네비게이션 뷰 포커스 맞추는 코드 62 // 네비게이션 뷰 포커스 맞추는 코드
33 val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation) as BottomNavigationView 63 val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigation) as BottomNavigationView
34 bottomNavigationView.selectedItemId = R.id.bottomHome 64 bottomNavigationView.selectedItemId = R.id.bottomHome
...@@ -45,26 +75,34 @@ class SignInActivity : AppCompatActivity() { ...@@ -45,26 +75,34 @@ class SignInActivity : AppCompatActivity() {
45 dialogView.findViewById<TextView>(R.id.dialogTitle).text="프로필을 입력해주세요!" 75 dialogView.findViewById<TextView>(R.id.dialogTitle).text="프로필을 입력해주세요!"
46 dialogView.findViewById<TextView>(R.id.dialogContent1).text="정확한 정책 추천을 얻으려면\n더 많은 프로필 정보가 필요해요!" 76 dialogView.findViewById<TextView>(R.id.dialogContent1).text="정확한 정책 추천을 얻으려면\n더 많은 프로필 정보가 필요해요!"
47 77
48 - builder.setView(dialogView) 78 + if(prof.getBoolean("popupdone?",false)==false){
49 - .setPositiveButton("지금 할게요 :)") { dialogInterface, i -> 79 + builder.setView(dialogView)
50 - //mainTv.text = dialogText.text.toString() 80 + .setPositiveButton("지금 할게요 :)") { dialogInterface, i ->
51 - //mainRb.rating = dialogRatingBar.rating 81 + //mainTv.text = dialogText.text.toString()
52 - /* 확인일 때 main의 View의 값에 dialog View에 있는 값을 적용 */ 82 + //mainRb.rating = dialogRatingBar.rating
83 + /* 확인일 때 main의 View의 값에 dialog View에 있는 값을 적용 */
84 +
85 + val intent = Intent(this, InputProfilFirstOneActivity::class.java)
86 + startActivity(intent)
87 + }
88 + .setNegativeButton("다음에 하기") { dialogInterface, i ->
89 + editor.clear()
90 +
91 + }
92 + .show()
93 + //여기서부터 점찍고 설정
94 + .questionImage.visibility=GONE
53 95
54 - val intent = Intent(this, InputProfilFirstOneActivity::class.java) 96 + editor.putBoolean("popupdone?",true)
55 - startActivity(intent) 97 + editor.commit()
56 - } 98 + }else{
57 - .setNegativeButton("다음에 하기") { dialogInterface, i ->
58 - editor.clear()
59 99
60 - } 100 + }
61 - .show()
62 - //여기서부터 점찍고 설정
63 - .questionImage.visibility=GONE
64 101
65 102
66 - //팝업창 끝
67 103
104 + //팝업창 끝
105 +/*
68 val policyFieldList = ArrayList<PolicyFieldItem>() 106 val policyFieldList = ArrayList<PolicyFieldItem>()
69 107
70 policyFieldList.add( 108 policyFieldList.add(
...@@ -107,7 +145,7 @@ class SignInActivity : AppCompatActivity() { ...@@ -107,7 +145,7 @@ class SignInActivity : AppCompatActivity() {
107 145
108 val adapter = PolicyFieldAdapter(policyFieldList) 146 val adapter = PolicyFieldAdapter(policyFieldList)
109 policyFieldRecyclerView.adapter = adapter 147 policyFieldRecyclerView.adapter = adapter
110 - 148 +*/
111 viewpager = findViewById(R.id.welcomeViewPager) as ViewPager 149 viewpager = findViewById(R.id.welcomeViewPager) as ViewPager
112 val viewpageradapter = ViewPagerAdapter(this) 150 val viewpageradapter = ViewPagerAdapter(this)
113 viewpager.adapter = viewpageradapter 151 viewpager.adapter = viewpageradapter
...@@ -145,6 +183,12 @@ class SignInActivity : AppCompatActivity() { ...@@ -145,6 +183,12 @@ class SignInActivity : AppCompatActivity() {
145 else 183 else
146 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show() 184 Toast.makeText(getBaseContext(), "\'뒤로\' 버튼을 한번 더 누르시면 종료됩니다.", Toast.LENGTH_SHORT).show()
147 back_pressed = System.currentTimeMillis() 185 back_pressed = System.currentTimeMillis()
186 +
187 + val prof: SharedPreferences =getSharedPreferences("profdata", Context.MODE_PRIVATE)
188 + val editor: SharedPreferences.Editor=prof.edit()
189 +
190 + editor.putBoolean("popupdone?",false)
191 + editor.commit()
148 } 192 }
149 193
150 // 4.툴바 메뉴 버튼이 클릭 됐을 때 콜백 194 // 4.툴바 메뉴 버튼이 클릭 됐을 때 콜백
......
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
12 android:color="#dcdcdc" /> 12 android:color="#dcdcdc" />
13 13
14 <solid android:color="#FFF" /> 14 <solid android:color="#FFF" />
15 + <corners
16 + android:bottomRightRadius="10dp"
17 + android:bottomLeftRadius="10dp"
18 + android:topLeftRadius="10dp"
19 + android:topRightRadius="10dp"/>
15 </shape> 20 </shape>
16 </item> 21 </item>
17 22
......
...@@ -22,26 +22,38 @@ ...@@ -22,26 +22,38 @@
22 <LinearLayout 22 <LinearLayout
23 android:layout_width="match_parent" 23 android:layout_width="match_parent"
24 android:layout_height="wrap_content" 24 android:layout_height="wrap_content"
25 + android:layout_weight="3"
25 android:orientation="vertical"> 26 android:orientation="vertical">
26 27
27 <ImageView 28 <ImageView
28 android:id="@+id/imageView" 29 android:id="@+id/imageView"
29 - android:layout_width="wrap_content" 30 + android:layout_width="match_parent"
30 - android:layout_height="wrap_content" 31 + android:layout_height="match_parent"
31 android:layout_gravity="center" 32 android:layout_gravity="center"
32 - tools:srcCompat="@tools:sample/avatars" 33 + android:layout_marginLeft="50dp"
33 - android:background="@drawable/inputlogo"/> 34 + android:layout_marginRight="50dp"
35 + android:background="@drawable/inputlogo" />
34 </LinearLayout> 36 </LinearLayout>
35 37
36 <LinearLayout 38 <LinearLayout
37 android:layout_width="match_parent" 39 android:layout_width="match_parent"
38 android:layout_height="30dp" 40 android:layout_height="30dp"
39 - android:layout_weight="2" 41 + android:layout_weight="1"
40 - android:orientation="vertical"></LinearLayout> 42 + android:gravity="center"
43 + android:orientation="vertical">
44 +
45 + <TextView
46 + android:id="@+id/textView11"
47 + android:layout_width="wrap_content"
48 + android:layout_height="wrap_content"
49 + android:gravity="center"
50 + android:text="WELLO는 프로필을 기반으로 동작해요\n더 정확한 맞춤형 결과를 위해 프로필을 입력해주세요!" />
51 + </LinearLayout>
41 52
42 <LinearLayout 53 <LinearLayout
43 android:layout_width="match_parent" 54 android:layout_width="match_parent"
44 android:layout_height="wrap_content" 55 android:layout_height="wrap_content"
56 + android:layout_weight="1"
45 android:orientation="vertical"> 57 android:orientation="vertical">
46 58
47 <Button 59 <Button
...@@ -56,10 +68,5 @@ ...@@ -56,10 +68,5 @@
56 android:textSize="20dp" /> 68 android:textSize="20dp" />
57 </LinearLayout> 69 </LinearLayout>
58 70
59 - <LinearLayout
60 - android:layout_width="match_parent"
61 - android:layout_height="30dp"
62 - android:layout_weight="3"
63 - android:orientation="vertical"></LinearLayout>
64 </LinearLayout> 71 </LinearLayout>
65 </androidx.constraintlayout.widget.ConstraintLayout> 72 </androidx.constraintlayout.widget.ConstraintLayout>
...\ No newline at end of file ...\ No newline at end of file
......