-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ui: 사용할 문자열 strings.xml에 추가 * feat: 짝꿍 만들기 3단계 fragment와 viewModel 생성 * ui: 짝꿍 만들기 3단계 ui 구현 * ui: editText background로 사용할 selector 구현 * ui: editText background 적용 * ui: editText에 완료 버튼 적용
- Loading branch information
1 parent
68a234e
commit b9a81d0
Showing
6 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...n/mate/src/main/java/com/depromeet/threedays/mate/create/step3/SetMateNicknameFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.depromeet.threedays.mate.create.step3 | ||
|
||
import androidx.fragment.app.viewModels | ||
import com.depromeet.threedays.core.BaseFragment | ||
import com.depromeet.threedays.mate.R | ||
import com.depromeet.threedays.mate.databinding.FragmentSetMateNicknameBinding | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class SetMateNicknameFragment : | ||
BaseFragment<FragmentSetMateNicknameBinding, SetMateNicknameViewMoodel>(R.layout.fragment_set_mate_nickname) { | ||
override val viewModel by viewModels<SetMateNicknameViewMoodel>() | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
...mate/src/main/java/com/depromeet/threedays/mate/create/step3/SetMateNicknameViewMoodel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.depromeet.threedays.mate.create.step3 | ||
|
||
import com.depromeet.threedays.core.BaseViewModel | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class SetMateNicknameViewMoodel @Inject constructor( | ||
) : BaseViewModel() { | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
presentation/mate/src/main/res/drawable/bg_rect_gray100_border_gray300_r10.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/gray_300" /> | ||
<corners android:radius="10dp" /> | ||
</shape> | ||
</item> | ||
|
||
<item | ||
android:bottom="1dp" | ||
android:end="1dp" | ||
android:start="1dp" | ||
android:top="1dp"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/gray_100" /> | ||
<corners android:radius="10dp" /> | ||
</shape> | ||
</item> | ||
</layer-list> |
5 changes: 5 additions & 0 deletions
5
presentation/mate/src/main/res/drawable/selector_edittext.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_focused="true" android:drawable="@drawable/bg_rect_gray100_border_gray300_r10" /> | ||
<item android:state_focused="false" android:drawable="@drawable/bg_rect_gray100_r10"/> | ||
</selector> |
117 changes: 117 additions & 0 deletions
117
presentation/mate/src/main/res/layout/fragment_set_mate_nickname.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<data> | ||
|
||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".create.SetMateNicknameFragment"> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_begin" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_begin="20dp" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_end" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_end="20dp" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_out" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="26dp" | ||
android:layout_marginTop="32dp" | ||
android:src="@drawable/ic_arrow_out" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/iv_illustrator" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:background="@drawable/bg_rect_gray200_r10" | ||
android:layout_marginTop="32dp" | ||
android:paddingHorizontal="49dp" | ||
android:paddingVertical="62dp" | ||
android:text="임시영역" | ||
app:layout_constraintEnd_toEndOf="@+id/gl_end" | ||
app:layout_constraintStart_toStartOf="@id/gl_begin" | ||
app:layout_constraintTop_toBottomOf="@+id/iv_out" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_set_mate_nickname_guide" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="40dp" | ||
android:text="@string/set_mate_nickname_guide" | ||
android:textAppearance="@style/Typography.Title1" | ||
app:layout_constraintStart_toStartOf="@id/gl_begin" | ||
app:layout_constraintTop_toBottomOf="@+id/iv_illustrator" /> | ||
|
||
<EditText | ||
android:id="@+id/et_nickname" | ||
android:layout_width="0dp" | ||
android:layout_height="45dp" | ||
android:background="@drawable/selector_edittext" | ||
android:layout_marginTop="24dp" | ||
android:paddingStart="16dp" | ||
android:hint="@string/input_nickname_hint" | ||
android:textColorHint="@color/gray_400" | ||
android:textColor="@color/gray_800" | ||
android:textAppearance="@style/Typography.Body1" | ||
android:inputType="text" | ||
android:importantForAutofill="no" | ||
android:imeOptions="actionDone" | ||
app:layout_constraintTop_toBottomOf="@+id/tv_set_mate_nickname_guide" | ||
app:layout_constraintStart_toStartOf="@id/gl_begin" | ||
app:layout_constraintEnd_toEndOf="@id/gl_end" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_count_nickname_length" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginEnd="16dp" | ||
android:textAppearance="@style/Typography.Body4.Medium" | ||
android:textColor="@color/gray_500" | ||
android:text="@string/count_nickname_length" | ||
app:layout_constraintTop_toTopOf="@id/et_nickname" | ||
app:layout_constraintBottom_toBottomOf="@id/et_nickname" | ||
app:layout_constraintEnd_toEndOf="@+id/et_nickname" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="10dp" | ||
android:textAppearance="@style/Typography.Body4.Medium" | ||
android:textColor="@color/green_system_color" | ||
android:text="@string/available_nickname_guide" | ||
app:layout_constraintTop_toBottomOf="@+id/et_nickname" | ||
app:layout_constraintStart_toStartOf="@id/gl_begin" /> | ||
|
||
<androidx.appcompat.widget.AppCompatButton | ||
android:id="@+id/btn_next" | ||
android:layout_width="0dp" | ||
android:layout_height="56dp" | ||
android:layout_marginBottom="20dp" | ||
android:background="@drawable/bg_rect_gray200_r15" | ||
android:textAppearance="@style/Typography.Button1" | ||
android:text="@string/step_3_button_text" | ||
android:textColor="@color/gray_450" | ||
android:gravity="center" | ||
android:stateListAnimator="@null" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="@+id/gl_begin" | ||
app:layout_constraintEnd_toEndOf="@id/gl_end" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters