Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI/#34] 설정 레이아웃 구현 #39

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/ic_setting_detail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="6dp"
android:height="11dp"
android:viewportWidth="6"
android:viewportHeight="11">
<path
android:pathData="M1,1L5,5.5L1,10"
android:strokeLineJoin="round"
android:strokeWidth="1.37405"
android:fillColor="#00000000"
android:strokeColor="#ADADAD"
android:strokeLineCap="round"/>
</vector>
25 changes: 25 additions & 0 deletions app/src/main/res/drawable/ic_setting_kakao.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="15dp"
android:viewportWidth="48"
android:viewportHeight="15">
<group>
<clip-path
android:pathData="M0,0h48v15h-48z"/>
<path
android:pathData="M1.673,14.739H0V0.372L1.673,0V14.739ZM6.149,4.313L7.459,5.279L4.239,9.405L7.968,13.977L6.676,14.999L2.274,9.497L6.149,4.312V4.313Z"
android:fillColor="#FFCD00"/>
<path
android:pathData="M9.449,12.007C9.449,10.979 9.785,10.195 10.459,9.656C11.131,9.117 12.111,8.847 13.396,8.847H15.325V8.197C15.325,6.623 14.645,5.837 13.287,5.837C12.851,5.837 12.392,5.898 11.914,6.022C11.435,6.146 10.995,6.301 10.595,6.486L10.103,5.278C10.6,4.993 11.137,4.774 11.714,4.618C12.29,4.463 12.85,4.385 13.396,4.385C15.749,4.385 16.924,5.668 16.924,8.233V14.738H15.688L15.489,13.623C14.991,14.032 14.46,14.347 13.897,14.571C13.333,14.795 12.797,14.905 12.286,14.905C11.402,14.905 10.707,14.648 10.204,14.134C9.701,13.619 9.449,12.91 9.449,12.005V12.007ZM12.59,13.531C12.819,13.531 13.058,13.5 13.305,13.438C13.552,13.376 13.8,13.296 14.047,13.196C14.295,13.097 14.528,12.976 14.745,12.834C14.963,12.691 15.156,12.539 15.325,12.378V10H13.586C12.705,10 12.062,10.155 11.657,10.464C11.253,10.774 11.051,11.263 11.051,11.933C11.051,12.998 11.563,13.531 12.59,13.531H12.59Z"
android:fillColor="#FFCD00"/>
<path
android:pathData="M21.577,14.739H19.904V0.372L21.577,0V14.739ZM26.051,4.313L27.361,5.279L24.142,9.405L27.87,13.977L26.579,14.999L22.177,9.497L26.051,4.312V4.313Z"
android:fillColor="#FFCD00"/>
<path
android:pathData="M29.353,12.007C29.353,10.979 29.69,10.195 30.362,9.656C31.036,9.117 32.014,8.847 33.3,8.847H35.228V8.197C35.228,6.623 34.549,5.837 33.191,5.837C32.755,5.837 32.297,5.898 31.818,6.022C31.338,6.146 30.899,6.301 30.5,6.486L30.008,5.278C30.505,4.993 31.042,4.774 31.617,4.618C32.193,4.463 32.754,4.385 33.3,4.385C35.652,4.385 36.829,5.668 36.829,8.233V14.738H35.591L35.391,13.623C34.894,14.032 34.365,14.347 33.8,14.571C33.236,14.795 32.7,14.905 32.19,14.905C31.304,14.905 30.611,14.648 30.108,14.134C29.604,13.619 29.353,12.91 29.353,12.005V12.007ZM32.494,13.531C32.722,13.531 32.962,13.5 33.209,13.438C33.456,13.376 33.704,13.296 33.951,13.196C34.199,13.097 34.431,12.976 34.649,12.834C34.866,12.691 35.059,12.539 35.228,12.378V10H33.489C32.607,10 31.964,10.155 31.56,10.464C31.155,10.774 30.954,11.263 30.954,11.933C30.954,12.998 31.467,13.531 32.494,13.531Z"
android:fillColor="#FFCD00"/>
<path
android:pathData="M43.561,4.405C44.943,4.405 46.03,4.864 46.817,5.78C47.605,6.698 48,8.011 48,9.721C48,11.432 47.609,12.701 46.826,13.606C46.044,14.51 44.955,14.963 43.561,14.963C42.167,14.963 41.093,14.51 40.306,13.606C39.518,12.701 39.123,11.406 39.123,9.721C39.123,8.037 39.52,6.698 40.314,5.78C41.109,4.864 42.191,4.405 43.561,4.405ZM43.561,5.78C42.688,5.78 42.018,6.115 41.552,6.784C41.084,7.453 40.851,8.432 40.851,9.721C40.851,11.009 41.084,11.96 41.552,12.611C42.018,13.262 42.688,13.587 43.561,13.587C44.435,13.587 45.122,13.262 45.59,12.611C46.057,11.96 46.29,10.998 46.29,9.721C46.29,8.444 46.057,7.453 45.59,6.784C45.122,6.115 44.446,5.78 43.561,5.78Z"
android:fillColor="#FFCD00"/>
</group>
</vector>
216 changes: 210 additions & 6 deletions app/src/main/res/layout/fragment_setting.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,220 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.main.setting.SettingFragment">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_setting"
<ScrollView
android:id="@+id/sv_setting"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="setting fragment" />
</androidx.constraintlayout.widget.ConstraintLayout>
android:layout_height="wrap_content"
android:background="@color/gray050">

<TextView
android:id="@+id/tv_setting_title"
style="@style/HeadingSemibold24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="56dp"
android:text="@string/setting_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_setting_nickname"
style="@style/SubtitleSemibold18"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="49dp"
android:lineHeight="26sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_setting_title"
tools:text="민지너는최고" />

<View
android:id="@+id/view_setting_divider1"
android:layout_width="0dp"
android:layout_height="14dp"
android:layout_marginTop="31dp"
android:background="@color/gray100"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_setting_nickname" />

<TextView
android:id="@+id/tv_setting_login_info"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_login_info"
android:textColor="@color/gray500"
app:drawableEndCompat="@drawable/ic_setting_kakao"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_setting_divider1" />

<TextView
android:id="@+id/tv_setting_auto_login"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_auto_login"
android:textColor="@color/gray500"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_setting_login_info" />

<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_setting_auto_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="25dp"
app:layout_constraintBottom_toBottomOf="@id/tv_setting_auto_login"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_setting_auto_login" />

<View
android:id="@+id/view_setting_divider2"
android:layout_width="0dp"
android:layout_height="14dp"
android:background="@color/gray100"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_setting_auto_login" />

<TextView
android:id="@+id/tv_setting_push_alarm"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_push_alarm"
android:textColor="@color/gray500"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_setting_divider2" />

<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_setting_push_alarm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="25dp"
app:layout_constraintBottom_toBottomOf="@id/tv_setting_push_alarm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_setting_push_alarm" />

<View
android:id="@+id/view_setting_divider3"
android:layout_width="0dp"
android:layout_height="14dp"
android:background="@color/gray100"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_setting_push_alarm" />

<TextView
android:id="@+id/tv_setting_version_info"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_version_info"
android:textColor="@color/gray500"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_setting_divider3" />

<TextView
android:id="@+id/btn_setting_terms_of_service"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_terms_of_service"
android:textColor="@color/gray500"
app:drawableEndCompat="@drawable/ic_setting_detail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_setting_version_info" />

<TextView
android:id="@+id/btn_setting_privacy_policy"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_privacy_policy"
android:textColor="@color/gray500"
app:drawableEndCompat="@drawable/ic_setting_detail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_setting_terms_of_service" />

<TextView
android:id="@+id/btn_setting_opensource_license"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_opensource_license"
android:textColor="@color/gray500"
app:drawableEndCompat="@drawable/ic_setting_detail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_setting_privacy_policy" />

<View
android:id="@+id/view_setting_divider4"
android:layout_width="0dp"
android:layout_height="14dp"
android:background="@color/gray100"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_setting_opensource_license" />

<TextView
android:id="@+id/btn_setting_logout"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_logout"
android:textColor="@color/red500"
app:drawableEndCompat="@drawable/ic_setting_detail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_setting_divider4" />

<TextView
android:id="@+id/btn_setting_leave"
style="@style/BodyMedium16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingHorizontal="25dp"
android:paddingVertical="18dp"
android:text="@string/setting_leave"
android:textColor="@color/gray400"
app:drawableEndCompat="@drawable/ic_setting_detail"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_setting_logout" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</layout>
15 changes: 13 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,22 @@
<string name="like_delete_btn">삭제하기</string>
<string name="like_delete_complete">삭제 완료</string>

<!-- uiState -->
<!-- setting -->
<string name="setting_title">설정</string>
<string name="setting_login_info">로그인 정보</string>
<string name="setting_auto_login">자동 로그인 사용</string>
<string name="setting_push_alarm">푸시 알람 설정</string>
<string name="setting_version_info">버전 정보</string>
<string name="setting_terms_of_service">서비스 이용 약관</string>
<string name="setting_privacy_policy">개인정보 처리방침</string>
<string name="setting_opensource_license">오픈소스 라이센스</string>
<string name="setting_logout">로그아웃</string>
<string name="setting_leave">탈퇴하기</string>

<!-- ui state -->
<string name="msg_search_null">검색결과가 없습니다.</string>
<string name="msg_server_error">네트워크 연결에 실패했습니다.</string>

<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>

</resources>