-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#219 이메일 인증 요청 뷰모델 추가, 요청 다이얼로그 레이아웃 추가
- Loading branch information
Showing
5 changed files
with
119 additions
and
3 deletions.
There are no files selected for viewing
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
10 changes: 8 additions & 2 deletions
10
feature/intro/src/main/java/com/android/mediproject/feature/intro/EmailVerificationDialog.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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
package com.android.mediproject.feature.intro | ||
|
||
fun emailVerificationDialog(verifyCode: (String) -> Unit, resendCode: () -> Unit) { | ||
|
||
import android.app.Activity | ||
import com.google.android.material.dialog.MaterialAlertDialogBuilder | ||
|
||
fun emailVerificationDialog(activity: Activity, verifyCode: (String) -> Unit, resendCode: () -> Unit) { | ||
val dialogBuilder = MaterialAlertDialogBuilder(activity).apply { | ||
_binding = FragmentMyPageMoreDialogBinding.inflate(layoutInflater, null, false) | ||
setView(onCreateView(layoutInflater, binding.rootLayout, savedInstanceState)) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...src/main/java/com/android/mediproject/feature/intro/verification/VerificationViewModel.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.android.mediproject.feature.intro.verification | ||
|
||
import com.android.mediproject.core.data.sign.SignRepository | ||
import com.android.mediproject.core.ui.base.BaseViewModel | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class VerificationViewModel @Inject constructor( | ||
private val signRepository: SignRepository, | ||
) : BaseViewModel() {} |
92 changes: 92 additions & 0 deletions
92
feature/intro/src/main/res/layout/dialog_email_verification.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,92 @@ | ||
<?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"> | ||
|
||
<LinearLayout | ||
android:id="@+id/rootLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@color/white" | ||
android:orientation="vertical" | ||
android:paddingHorizontal="20dp"> | ||
|
||
<TextView | ||
android:id="@+id/dialogTitleTV" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="25dp" | ||
android:gravity="center" | ||
android:text="@string/emailVerification" | ||
android:textColor="@color/main" | ||
android:textSize="20sp" /> | ||
|
||
<com.google.android.material.divider.MaterialDivider | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" | ||
android:layout_marginTop="10dp" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:textSize="16sp" | ||
android:text="@string/verificationCodeDescription" | ||
android:layout_marginTop="25dp" /> | ||
|
||
<com.android.mediproject.core.ui.base.view.Subtitle | ||
android:id="@+id/dialogSubtitle1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="25dp" | ||
app:edtHint="@string/verificationCodeHint" | ||
app:title="@string/verificationCode" /> | ||
|
||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="50dp" | ||
android:layout_marginBottom="40dp" | ||
android:orientation="horizontal"> | ||
|
||
<TextView | ||
android:id="@+id/positiveButton" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginEnd="15dp" | ||
android:background="@drawable/radius_main_5" | ||
android:gravity="center" | ||
android:paddingVertical="10dp" | ||
android:text="@string/complete" | ||
android:textColor="@color/white" | ||
android:textSize="18sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="@id/guideline" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/negativeButton" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="15dp" | ||
android:background="@drawable/rectangle_5_white_main" | ||
android:gravity="center" | ||
android:paddingVertical="10dp" | ||
android:text="@string/cancel" | ||
android:textColor="@color/main" | ||
android:textSize="18sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="@id/guideline" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/guideline" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:layout_constraintGuide_percent="0.5" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
</LinearLayout> | ||
</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