Skip to content

Commit

Permalink
Design: 로그아웃 모달창 마진값 변경 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dkyuuum committed Feb 16, 2024
1 parent 50602cb commit 70e72a5
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.view.KeyEvent
import android.view.WindowManager
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager
import androidx.activity.viewModels
Expand Down Expand Up @@ -75,6 +76,7 @@ class LoginActivity : AppCompatActivity() {
dialogBuilder.setView(customView)

val dialog = dialogBuilder.create()

dialog.show()

Handler().postDelayed({
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/bg_dialog_black_47.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="20dp" />
<solid android:color="#78000000" /> <!-- 검정색의 투명도를 나타내는 78(47) + 검정색 값 -->
<solid android:color="#78000000" />
</shape>
83 changes: 48 additions & 35 deletions app/src/main/res/layout/custom_dialog_logout.xml
Original file line number Diff line number Diff line change
@@ -1,48 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_solid_white_radius_20"
android:orientation="vertical">
android:background="@null">

<TextView
android:id="@+id/textView_message"
style="@style/SemiBoldFont.16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="21dp"
android:text="포어그래드에서\n로그아웃 하시겠습니까?"
android:textColor="@android:color/black" />

<!-- 버튼들 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
android:layout_marginStart="38dp"
android:layout_marginEnd="38dp"
android:background="@drawable/bg_solid_white_radius_20"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button_positive"
<TextView
android:id="@+id/textView_message"
style="@style/SemiBoldFont.16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:background="@drawable/bg_solid_white_radius_20"
android:stateListAnimator="@null"
android:padding="15dp"
android:text="로그아웃"
android:textColor="@color/skyBlue" />
android:gravity="center"
android:padding="21dp"
android:text="포어그래드에서\n로그아웃 하시겠습니까?"
android:textColor="@android:color/black" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button_negative"
style="@style/SemiBoldFont.16"
<!-- 버튼들 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_solid_white_radius_20"
android:stateListAnimator="@null"
android:padding="15dp"
android:text="닫기"
android:textColor="@color/black" />
android:gravity="center"
android:orientation="vertical">

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button_positive"
style="@style/SemiBoldFont.16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:background="@drawable/bg_solid_white_radius_20"
android:padding="15dp"
android:stateListAnimator="@null"
android:text="로그아웃"
android:textColor="@color/skyBlue" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button_negative"
style="@style/SemiBoldFont.16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_solid_white_radius_20"
android:padding="15dp"
android:stateListAnimator="@null"
android:text="닫기"
android:textColor="@color/black" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
36 changes: 20 additions & 16 deletions app/src/main/res/layout/custom_dialog_logout_home.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_black_47"
android:orientation="vertical">
android:backgroundTint="@null">

<TextView
android:id="@+id/textView_message"
style="@style/SemiBoldFont.16"
android:layout_width="match_parent"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="38dp"
android:layout_marginEnd="38dp"
android:gravity="center"
android:padding="21dp"
android:text="로그아웃 되었습니다."
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@drawable/bg_dialog_black_47"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">

<TextView
android:id="@+id/textView_message"
style="@style/SemiBoldFont.16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="21dp"
android:text="로그아웃 되었습니다."
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 70e72a5

Please sign in to comment.