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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
321 additions
and
35 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
...
...
@@ -34,17 +34,25 @@
android:src=
"@drawable/toolbar_logo"
/>
</androidx.appcompat.widget.Toolbar>
<androidx.viewpager.widget.ViewPager
android:id=
"@+id/welcomeViewPager"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"262dp"
android:layout_gravity=
"center"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
android:layout_height=
"wrap_content"
android:layout_gravity=
"top"
android:layout_weight=
"1"
android:gravity=
"top"
android:orientation=
"horizontal"
>
<androidx.viewpager.widget.ViewPager
android:id=
"@+id/welcomeViewPager"
android:layout_width=
"match_parent"
android:layout_height=
"262dp"
android:layout_gravity=
"top"
android:layout_weight=
"1"
>
</androidx.viewpager.widget.ViewPager>
</androidx.viewpager.widget.ViewPager>
</LinearLayout>
<!--
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
...
@@ -76,6 +84,210 @@
app:spanCount="3"
tools:listitem="@layout/item_policyfield" />
</LinearLayout>
-->
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:layout_weight=
"1"
android:background=
"@drawable/edgemaking"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/kyoyookButton"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:background=
"@drawable/kyoyook_icon"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/kyoyooktextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"교육"
android:textColor=
"#4A4A4A"
android:textSize=
"13dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/koyongButton"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:background=
"@drawable/koyong_icon"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/koyongtextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"고용"
android:textColor=
"#4A4A4A"
android:textSize=
"13dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/joogeoButton"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:background=
"@drawable/joogeo_icon"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/joogeotextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"주거"
android:textColor=
"#4A4A4A"
android:textSize=
"13dp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/geongangButton"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:background=
"@drawable/health_icon"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/geongangtextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"건강"
android:textColor=
"#4A4A4A"
android:textSize=
"13dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/seominButton"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:background=
"@drawable/seomin_icon"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/seomintextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"서민금융"
android:textColor=
"#4A4A4A"
android:textSize=
"13dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/moonhwaButton"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:background=
"@drawable/moonhwa_icon"
android:gravity=
"center"
/>
<TextView
android:id=
"@+id/moonhwatextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"문화"
android:textColor=
"#4A4A4A"
android:textSize=
"13dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id=
"@+id/bottomNavigation"
...
...
Please
register
or
login
to post a comment