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
신기성
2019-11-19 00:43:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1235cc073849d88c3728b759fe56023d766092ca
1235cc07
1 parent
25839cbc
profile design
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
27 deletions
vip/app/src/main/java/com/example/vip/FavoritesActivity.kt
vip/app/src/main/java/com/example/vip/InfoActivity.kt
vip/app/src/main/java/com/example/vip/RecommendActivity.kt
vip/app/src/main/java/com/example/vip/SignInActivity.kt
vip/app/src/main/res/drawable/edgemaking.xml
vip/app/src/main/res/layout/activity_input_profil_first_one.xml
vip/app/src/main/res/layout/activity_signin.xml
vip/app/src/main/java/com/example/vip/FavoritesActivity.kt
View file @
1235cc0
...
...
@@ -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
()
}
...
...
vip/app/src/main/java/com/example/vip/InfoActivity.kt
View file @
1235cc0
...
...
@@ -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
()
}
...
...
vip/app/src/main/java/com/example/vip/RecommendActivity.kt
View file @
1235cc0
...
...
@@ -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
)
{
...
...
vip/app/src/main/java/com/example/vip/SignInActivity.kt
View file @
1235cc0
...
...
@@ -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.툴바 메뉴 버튼이 클릭 됐을 때 콜백
...
...
vip/app/src/main/res/drawable/edgemaking.xml
View file @
1235cc0
...
...
@@ -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>
...
...
vip/app/src/main/res/layout/activity_input_profil_first_one.xml
View file @
1235cc0
...
...
@@ -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_cont
ent"
android:layout_height=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"
match_par
ent"
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
...
...
vip/app/src/main/res/layout/activity_signin.xml
View file @
1235cc0
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment