Skip to content

Commit 51c3e5d

Browse files
committed
refactor: 코드 클린 업
1 parent 17e49b7 commit 51c3e5d

8 files changed

Lines changed: 83 additions & 41 deletions

File tree

design-system/src/main/java/com/onewx2m/design_system/components/button/MainButton.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MainButton @JvmOverloads constructor(
4141
private fun changeStateToPositive() {
4242
setButtonClickFocus(true)
4343
binding.apply {
44-
constraintLayoutButton.setBackgroundResource(R.drawable.ripple_gray01_bg_solid_blue_rounded_5)
44+
constraintLayoutButton.setBackgroundResource(R.drawable.ripple_black01_bg_solid_blue_rounded_5)
4545
textViewContent.setTextColor(context.getColor(R.color.white01))
4646
}
4747
hideLoading()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<group>
7+
<clip-path
8+
android:pathData="M0,0h24v24h-24z"/>
9+
<path
10+
android:pathData="M19.71,2.837C20.443,2.984 21.016,3.557 21.163,4.29C21.268,4.815 21.253,5.357 21.119,5.876C20.985,6.394 20.736,6.876 20.39,7.285L17.639,10.537L19.583,17.668C19.641,17.881 19.642,18.105 19.585,18.318C19.529,18.531 19.417,18.725 19.261,18.881L17.959,20.183C17.848,20.294 17.714,20.377 17.566,20.426C17.417,20.476 17.26,20.491 17.105,20.469C16.95,20.447 16.802,20.39 16.673,20.301C16.545,20.213 16.438,20.096 16.362,19.959L13.369,14.572L10.111,16.827V17.614C10.111,17.945 9.979,18.264 9.745,18.498L8.062,20.18C7.94,20.302 7.789,20.391 7.624,20.438C7.458,20.485 7.283,20.489 7.115,20.449C6.948,20.41 6.793,20.328 6.666,20.212C6.539,20.095 6.443,19.948 6.389,19.785L5.845,18.154L4.214,17.61C4.051,17.556 3.904,17.46 3.787,17.333C3.671,17.206 3.589,17.051 3.55,16.884C3.51,16.716 3.514,16.541 3.561,16.375C3.608,16.21 3.697,16.059 3.819,15.937L5.502,14.254C5.618,14.138 5.756,14.046 5.908,13.983C6.059,13.92 6.222,13.888 6.386,13.888H7.173L9.428,10.63L4.041,7.637C3.904,7.561 3.787,7.455 3.699,7.326C3.61,7.197 3.553,7.049 3.531,6.894C3.509,6.739 3.524,6.582 3.574,6.433C3.623,6.285 3.706,6.151 3.817,6.04L5.119,4.738C5.275,4.582 5.469,4.47 5.682,4.414C5.895,4.357 6.119,4.358 6.332,4.416L13.462,6.36L16.715,3.609C17.124,3.263 17.605,3.014 18.124,2.88C18.643,2.746 19.185,2.732 19.71,2.837Z"
11+
android:fillColor="#363EA2"/>
12+
</group>
13+
</vector>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:pathData="M15.125,21.1L6.7,12.7C6.6,12.6 6.529,12.492 6.487,12.375C6.445,12.258 6.424,12.133 6.425,12C6.425,11.867 6.446,11.742 6.487,11.625C6.528,11.508 6.599,11.4 6.7,11.3L15.125,2.875C15.358,2.642 15.65,2.525 16,2.525C16.35,2.525 16.65,2.65 16.9,2.9C17.15,3.15 17.275,3.442 17.275,3.775C17.275,4.108 17.15,4.4 16.9,4.65L9.55,12L16.9,19.35C17.133,19.583 17.25,19.871 17.25,20.213C17.25,20.555 17.125,20.851 16.875,21.1C16.625,21.35 16.333,21.475 16,21.475C15.667,21.475 15.375,21.35 15.125,21.1Z"
8+
android:fillColor="#000000"/>
9+
</vector>

design-system/src/main/res/drawable/ripple_gray01_bg_solid_blue_rounded_5.xml renamed to design-system/src/main/res/drawable/ripple_black01_bg_solid_blue_rounded_5.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:color="@color/gray01">
3+
android:color="@color/black01">
44
<item>
55
<shape android:shape="rectangle">
66
<solid android:color="@color/blue" />

design-system/src/main/res/layout/button_main.xml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<FrameLayout android:layout_height="50dp"
3-
android:layout_width="match_parent"
4-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
53
xmlns:app="http://schemas.android.com/apk/res-auto"
6-
xmlns:tools="http://schemas.android.com/tools">
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="50dp">
77

88
<androidx.constraintlayout.widget.ConstraintLayout
9-
android:clickable="true"
10-
android:focusable="true"
119
android:id="@+id/constraint_layout_button"
12-
android:layout_height="50dp"
1310
android:layout_width="match_parent"
11+
android:layout_height="50dp"
12+
android:clickable="true"
13+
android:focusable="true"
1414
android:paddingHorizontal="15dp"
15-
tools:background="@drawable/ripple_gray01_bg_solid_blue_rounded_5">
15+
android:background="@drawable/ripple_black01_bg_solid_blue_rounded_5">
1616

1717
<com.google.android.material.progressindicator.CircularProgressIndicator
1818
android:id="@+id/progress_bar_loading_button"
19-
android:indeterminate="true"
20-
android:layout_height="16dp"
2119
android:layout_width="16dp"
20+
android:layout_height="16dp"
21+
android:indeterminate="true"
2222
android:visibility="invisible"
2323
app:indicatorColor="@color/white01"
2424
app:indicatorSize="16dp"
@@ -31,27 +31,28 @@
3131
tools:visibility="visible" />
3232

3333
<com.onewx2m.design_system.components.textview.FigmaTextView
34-
style="@style/Header.3"
35-
android:gravity="center_horizontal"
3634
android:id="@+id/text_view_content"
35+
style="@style/Header.3"
36+
android:layout_width="wrap_content"
3737
android:layout_height="wrap_content"
3838
android:layout_marginStart="10dp"
39-
android:layout_width="wrap_content"
39+
android:gravity="center_horizontal"
4040
android:textColor="@color/white01"
4141
app:layout_constraintBottom_toBottomOf="parent"
4242
app:layout_constraintEnd_toEndOf="parent"
4343
app:layout_constraintStart_toEndOf="@id/progress_bar_loading_button"
4444
app:layout_constraintTop_toTopOf="parent"
45+
android:text="확인~~~~~~~"
4546
tools:text="확인" />
4647

4748

4849
</androidx.constraintlayout.widget.ConstraintLayout>
4950

5051
<View
51-
android:background="@drawable/bg_solid_white02_rounded_5"
5252
android:id="@+id/view_loading"
53-
android:layout_height="50dp"
5453
android:layout_width="match_parent"
54+
android:layout_height="50dp"
55+
android:background="@drawable/bg_solid_white02_rounded_5"
5556
android:visibility="invisible"
5657
app:layout_constraintBottom_toBottomOf="parent"
5758
app:layout_constraintTop_toTopOf="parent" />

design-system/src/main/res/layout/button_sns_login.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<FrameLayout android:layout_height="50dp"
3-
android:layout_width="match_parent"
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
43
xmlns:app="http://schemas.android.com/apk/res-auto"
5-
xmlns:android="http://schemas.android.com/apk/res/android"
6-
xmlns:tools="http://schemas.android.com/tools">
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="50dp">
77

88
<androidx.constraintlayout.widget.ConstraintLayout
9-
android:clickable="true"
10-
android:focusable="true"
119
android:id="@+id/constraint_layout_button"
12-
android:layout_height="50dp"
1310
android:layout_width="match_parent"
11+
android:layout_height="50dp"
12+
android:clickable="true"
13+
android:focusable="true"
1414
android:paddingHorizontal="24dp"
1515
tools:background="@drawable/ripple_gray01_bg_solid_kakao01_rounded_5">
1616

1717
<com.google.android.material.progressindicator.CircularProgressIndicator
1818
android:id="@+id/progress_bar_loading_button"
19-
android:indeterminate="true"
20-
android:layout_height="24dp"
2119
android:layout_width="24dp"
20+
android:layout_height="24dp"
21+
android:indeterminate="true"
2222
android:visibility="invisible"
2323
app:indicatorColor="@color/black01"
2424
app:indicatorSize="24dp"
@@ -29,23 +29,23 @@
2929
tools:visibility="visible" />
3030

3131
<ImageView
32-
android:contentDescription="@string/content_description_logo"
3332
android:id="@+id/image_view_sns_logo"
34-
android:layout_height="wrap_content"
3533
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:contentDescription="@string/content_description_logo"
3636
app:layout_constraintBottom_toBottomOf="parent"
3737
app:layout_constraintStart_toStartOf="parent"
3838
app:layout_constraintTop_toTopOf="parent"
3939
tools:src="@drawable/ic_kakao"
4040
tools:visibility="gone" />
4141

4242
<com.onewx2m.design_system.components.textview.FigmaTextView
43-
style="@style/Header.3"
44-
android:gravity="center_horizontal"
4543
android:id="@+id/text_view_content"
44+
style="@style/Header.3"
45+
android:layout_width="0dp"
4646
android:layout_height="wrap_content"
4747
android:layout_marginStart="24dp"
48-
android:layout_width="0dp"
48+
android:gravity="center_horizontal"
4949
app:layout_constraintBottom_toBottomOf="parent"
5050
app:layout_constraintEnd_toEndOf="parent"
5151
app:layout_constraintStart_toEndOf="@id/image_view_sns_logo"
@@ -56,10 +56,10 @@
5656
</androidx.constraintlayout.widget.ConstraintLayout>
5757

5858
<View
59-
android:background="@drawable/bg_solid_white02_rounded_5"
6059
android:id="@+id/view_loading"
61-
android:layout_height="50dp"
6260
android:layout_width="match_parent"
61+
android:layout_height="50dp"
62+
android:background="@drawable/bg_solid_white02_rounded_5"
6363
android:visibility="invisible"
6464
app:layout_constraintBottom_toBottomOf="parent"
6565
app:layout_constraintTop_toTopOf="parent" />

feature/feature-login-signup/src/main/java/com/onewx2m/login_signup/ui/signup/SignUpFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package com.onewx2m.login_signup.ui.signup
33
import androidx.fragment.app.viewModels
44
import com.onewx2m.feature_login_signup.databinding.FragmentSignUpBinding
55
import com.onewx2m.mvi.MviFragment
6+
import dagger.hilt.android.AndroidEntryPoint
67

8+
@AndroidEntryPoint
79
class SignUpFragment : MviFragment<FragmentSignUpBinding, SignUpViewState, SignUpEvent, SignUpSideEffect, SignUpViewModel>(
810
FragmentSignUpBinding::inflate,
911
) {
1012
override val viewModel: SignUpViewModel by viewModels()
1113

1214
override fun initView() {
13-
TODO("Not yet implemented")
1415
}
1516
}
Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
1-
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
1+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
23
xmlns:tools="http://schemas.android.com/tools"
34
android:layout_width="match_parent"
45
android:layout_height="match_parent"
5-
android:background="@color/pink"
6+
android:paddingHorizontal="20dp"
7+
android:paddingTop="16dp"
8+
android:paddingBottom="32dp"
69
tools:context="com.onewx2m.login_signup.ui.signup.SignUpFragment">
710

8-
<!-- TODO: Update blank fragment layout -->
9-
<TextView
11+
<ImageButton
12+
android:id="@+id/image_button_back"
13+
android:layout_width="24dp"
14+
android:layout_height="24dp"
15+
android:background="@drawable/ic_back"
16+
app:layout_constraintStart_toStartOf="parent"
17+
app:layout_constraintTop_toTopOf="parent" />
18+
19+
20+
<com.onewx2m.design_system.components.button.MainButton
21+
android:id="@+id/button_sign_up"
1022
android:layout_width="match_parent"
11-
android:layout_height="match_parent"
12-
android:text="약관 동의 화면" />
23+
android:layout_height="50dp"
24+
app:layout_constraintBottom_toBottomOf="parent"
25+
app:layout_constraintEnd_toEndOf="parent"
26+
app:layout_constraintStart_toStartOf="parent">
27+
28+
<include layout="@layout/button_main" />
29+
30+
</com.onewx2m.design_system.components.button.MainButton>
1331

14-
</FrameLayout>
32+
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)