Skip to content

Commit

Permalink
modify: change mypage design
Browse files Browse the repository at this point in the history
  • Loading branch information
HI-JIN2 committed Sep 22, 2024
1 parent c8c60c9 commit 8a9bef9
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.graphics.Paint
import android.net.Uri
import android.os.Build
import android.os.Bundle
Expand Down Expand Up @@ -58,6 +59,9 @@ class MyPageActivity : BaseActivity<ActivityMyPageBinding>(ActivityMyPageBinding
initViewModel()
setOnClickListener()

binding.tvSignout.paintFlags = Paint.UNDERLINE_TEXT_FLAG


lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
myPageViewModel.uiState.collect {
Expand Down Expand Up @@ -115,7 +119,7 @@ class MyPageActivity : BaseActivity<ActivityMyPageBinding>(ActivityMyPageBinding
showLogoutDialog()
}

binding.tvSignout.setOnClickListener {
binding.llSignout.setOnClickListener {
val intent = Intent(this, SignOutActivity::class.java)
intent.putExtra("nickname", myPageViewModel.uiState.value.nickname)
startActivity(intent)
Expand Down
Binary file added app/src/main/res/drawable/ic_unsubscribe_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions app/src/main/res/drawable/selector_toggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true">
<shape android:shape="rectangle">
<size android:width="50dp" android:height="25dp" />
<size android:width="45dp" android:height="31dp" />
<solid android:color="@color/primary" />
<corners android:radius="46dp" />
<corners android:radius="15dp" />
</shape>
</item>
<item android:state_checked="false">
<shape android:shape="rectangle">
<size android:width="50dp" android:height="25dp" />
<size android:width="45dp" android:height="31dp" />
<solid android:color="@color/gray400" />
<corners android:radius="46dp" />
<corners android:radius="15dp" />
</shape>
</item>
</selector>
6 changes: 3 additions & 3 deletions app/src/main/res/drawable/shape_toggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="25dp"
android:height="25dp" />
android:width="30dp"
android:height="30dp" />
<solid android:color="@color/white" />
<stroke
android:width="5dp"
android:width="3dp"
android:color="@android:color/transparent" />
</shape>
110 changes: 80 additions & 30 deletions app/src/main/res/layout/activity_my_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:orientation="vertical">

<ImageView
android:id="@+id/ib_profile"
Expand All @@ -39,9 +38,9 @@
<TextView
android:id="@+id/tv_nickname"
style="@style/Body1"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/nickname"
android:textColor="@color/black" />

Expand All @@ -63,7 +62,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp">
android:layout_marginTop="4dp">

<TextView
android:id="@+id/tv_account"
Expand Down Expand Up @@ -91,20 +90,56 @@
android:src="@drawable/ic_kakao_login" />
</LinearLayout>

<androidx.appcompat.widget.SwitchCompat
android:id="@+id/alarm_switch"
android:layout_width="wrap_content"
<!--ํ‘ธ์‹œ์•Œ๋ฆผ-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
style="@style/category_toggle"
android:text="ํ‘ธ์‹œ ์•Œ๋ฆผ ์„ค์ •\n๋งค์ผ ์˜ค์ „ 11์‹œ์— ์•Œ๋ฆผ์„ ๋ณด๋‚ด๋“œ๋ ค์š”" />
android:layout_marginTop="16dp"
android:orientation="horizontal"
android:paddingStart="24dp"
android:paddingEnd="24dp">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
style="@style/Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ํ‘ธ์‹œ ์•Œ๋ฆผ ์„ค์ •"
android:textColor="@color/black" />

<TextView
style="@style/Caption2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="๋งค์ผ ์˜ค์ „ 11์‹œ์— ์•Œ๋ฆผ์„ ๋ณด๋‚ด๋“œ๋ ค์š”"
android:textColor="@color/gray400" />
</LinearLayout>

<android.widget.Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<androidx.appcompat.widget.SwitchCompat
android:id="@+id/alarm_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:thumb="@drawable/shape_toggle"
app:switchMinWidth="0dp"
app:thumbTextPadding="24dp"
app:track="@drawable/selector_toggle" />
</LinearLayout>

<!-- ๋‚˜๋จธ์ง€ ๋ ˆ์ด์•„์›ƒ๋“ค -->
<LinearLayout
android:id="@+id/ll_my_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical">

<!-- ๋‚ด๊ฐ€ ์“ด ๋ฆฌ๋ทฐ -->
Expand Down Expand Up @@ -138,7 +173,7 @@
android:background="@android:color/transparent"
android:scaleType="fitCenter"
android:src="@drawable/ic_arrow_right"
android:tint="@color/gray300" />
app:tint="@color/gray300" />
</LinearLayout>

<!-- ๋ฌธ์˜ํ•˜๊ธฐ -->
Expand Down Expand Up @@ -173,7 +208,7 @@
android:background="@android:color/transparent"
android:scaleType="fitCenter"
android:src="@drawable/ic_arrow_right"
android:tint="@color/gray300" />
app:tint="@color/gray300" />

</LinearLayout>

Expand Down Expand Up @@ -209,7 +244,7 @@
android:background="@android:color/transparent"
android:scaleType="fitCenter"
android:src="@drawable/ic_arrow_right"
android:tint="@color/gray300" />
app:tint="@color/gray300" />
</LinearLayout>

<!-- ๊ฐœ์ธ์ •๋ณด ์ฒ˜๋ฆฌ๋ฐฉ์นจ -->
Expand Down Expand Up @@ -245,11 +280,10 @@
android:background="@android:color/transparent"
android:scaleType="fitCenter"
android:src="@drawable/ic_arrow_right"
android:tint="@color/gray300" />
app:tint="@color/gray300" />
</LinearLayout>



<!-- ๋งŒ๋“  ์‚ฌ๋žŒ๋“ค -->
<LinearLayout
android:id="@+id/ll_developer"
Expand Down Expand Up @@ -283,10 +317,9 @@
android:background="@android:color/transparent"
android:scaleType="fitCenter"
android:src="@drawable/ic_arrow_right"
android:tint="@color/gray300" />
app:tint="@color/gray300" />
</LinearLayout>

<!-- ๋กœ๊ทธ์•„์›ƒ -->
<!-- ํƒˆํ‡ดํ•˜๊ธฐ -->
<TextView
android:id="@+id/tv_logout"
style="@style/Body1"
Expand All @@ -299,6 +332,7 @@
android:paddingBottom="18dp"
android:text="@string/logout"
android:textColor="@color/black" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -314,7 +348,7 @@
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:text="@string/app_version"
android:textColor="@color/black"
android:textColor="@color/gray400"
app:layout_constraintStart_toStartOf="@+id/ll_my_page"
app:layout_constraintTop_toBottomOf="@+id/ll_my_page" />

Expand All @@ -329,7 +363,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:textColor="@color/black"
android:textColor="@color/gray400"
app:layout_constraintBottom_toBottomOf="@+id/tv_app_version_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_app_version_title" />
Expand All @@ -351,7 +385,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/store_app_version"
android:textColor="@color/black"
android:textColor="@color/gray400"
app:layout_constraintStart_toStartOf="@+id/ll_my_page"
app:layout_constraintTop_toBottomOf="@+id/ll_my_page" />

Expand All @@ -366,25 +400,41 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:textColor="@color/black"
android:textColor="@color/gray400"
app:layout_constraintBottom_toBottomOf="@+id/tv_app_version_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_app_version_title" />
</LinearLayout>

<!-- ํƒˆํ‡ดํ•˜๊ธฐ -->
<TextView
android:id="@+id/tv_signout"
style="@style/Body1"
android:layout_width="match_parent"
<LinearLayout
android:id="@+id/ll_signout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:layout_gravity="end"
android:gravity="center"
android:orientation="horizontal"
android:paddingStart="24dp"
android:paddingTop="18dp"
android:paddingEnd="24dp"
android:paddingBottom="18dp"
android:paddingBottom="18dp">


<TextView
android:id="@+id/tv_signout"
style="@style/Caption2"
android:gravity="end"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:text="@string/signout"
android:textColor="@color/black" />
android:textColor="@color/gray400" />

<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/ic_unsubscribe_16" />
</LinearLayout>
</LinearLayout>

</LinearLayout>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
</string-array>


<string name="my_review">๋‚ด๊ฐ€ ์“ด ๋ฆฌ๋ทฐ</string>
<string name="my_review">๋‚ด ๋ฆฌ๋ทฐ</string>
<string name="change_pw">๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ</string>
<string name="announce">๊ณต์ง€์‚ฌํ•ญ</string>
<string name="logout">๋กœ๊ทธ์•„์›ƒ</string>
<string name="signout">ํƒˆํ‡ดํ•˜๊ธฐ</string>
<string name="signout">ํšŒ์›ํƒˆํ‡ด</string>
<string name="app_version">์•ฑ ๋ฒ„์ „</string>
<string name="pw_rules">์˜๋ฌธ์ž๊ณผ ์ˆซ์ž๋ฅผ ํฌํ•จํ•˜์—ฌ 8์ž ์ด์ƒ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.</string>
<string name="complete">์™„๋ฃŒํ•˜๊ธฐ</string>
Expand Down

0 comments on commit 8a9bef9

Please sign in to comment.