Skip to content

Commit

Permalink
feat: 초기화면 xml 데이터바인딩 레이아웃으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ootr47 committed Nov 15, 2023
1 parent f4262ea commit 27dcd18
Showing 1 changed file with 73 additions and 62 deletions.
135 changes: 73 additions & 62 deletions android/app/src/main/res/layout/activity_intro.xml
Original file line number Diff line number Diff line change
@@ -1,63 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<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="match_parent">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_vertical_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_vertical_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />

<ImageView
android:id="@+id/iv_intro_app_logo"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginTop="114dp"
android:src="@drawable/ic_priceguard_foreground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_intro_app_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?attr/textAppearanceDisplayMedium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_intro_app_logo" />

<Button
android:id="@+id/btn_intro_login"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/login"
app:layout_constraintBottom_toTopOf="@id/btn_intro_sign_up"
app:layout_constraintEnd_toStartOf="@+id/gl_vertical_end"
app:layout_constraintStart_toEndOf="@+id/gl_vertical_start" />

<Button
android:id="@+id/btn_intro_sign_up"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="@string/sign_up"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/gl_vertical_end"
app:layout_constraintStart_toEndOf="@+id/gl_vertical_start" />

</androidx.constraintlayout.widget.ConstraintLayout>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data>
<variable
name="viewModel"
type="app.priceguard.ui.intro.IntroViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_vertical_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_vertical_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />

<ImageView
android:id="@+id/iv_intro_app_logo"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginTop="114dp"
android:src="@drawable/ic_priceguard_foreground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_intro_app_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?attr/textAppearanceDisplayMedium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_intro_app_logo" />

<Button
android:id="@+id/btn_intro_login"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/login"
app:layout_constraintBottom_toTopOf="@id/btn_intro_sign_up"
app:layout_constraintEnd_toStartOf="@+id/gl_vertical_end"
app:layout_constraintStart_toEndOf="@+id/gl_vertical_start"
android:onClick="@{() -> viewModel.startLoginActivity()}" />

<Button
android:id="@+id/btn_intro_sign_up"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="@string/sign_up"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/gl_vertical_end"
app:layout_constraintStart_toEndOf="@+id/gl_vertical_start"
android:onClick="@{() -> viewModel.startSignupActivity()}" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

0 comments on commit 27dcd18

Please sign in to comment.