Skip to content

Commit

Permalink
[UI/#15] Activity 생성 및 xml 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
chattymin committed Jan 3, 2024
1 parent babe7e5 commit d148793
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.going.presentation.tendencytest

import android.os.Bundle
import com.going.presentation.R
import com.going.presentation.databinding.ActivityTendencyTestSplashBinding
import com.going.ui.base.BaseActivity
import com.going.ui.extension.setOnSingleClickListener

class TendencyTestActivity :
BaseActivity<ActivityTendencyTestSplashBinding>(R.layout.activity_tendency_test_splash) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

initStartBtnSingleClickListener()
}

private fun initStartBtnSingleClickListener() {
binding.btnTendencySplashStart.setOnSingleClickListener {
// 페이지 이동~
}
}
}
91 changes: 49 additions & 42 deletions presentation/src/main/res/layout/activity_tendency_test_splash.xml
Original file line number Diff line number Diff line change
@@ -1,47 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/white_000">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<TextView
android:id="@+id/tv_tendency_splash_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tendency_splash_title"
android:gravity="center"
android:textColor="@color/gray_700"
android:layout_marginTop="236dp"
style="@style/TextAppearance.Doorip.Head3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<data>

<!--더미 이미지의 크기가 너무 커서 임시로 크기를 지정했습니다. 추후 이미자가 나온다면 wrap_content 사용 예정-->
<ImageView
android:layout_width="200dp"
android:layout_height="126dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_tendency_splash_title"
android:layout_marginTop="10dp"
android:src="@drawable/img_sign_in_main" />
</data>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_tendency_splash_start"
style="@style/button_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="22dp"
android:background="@drawable/sel_rounded_corner_button"
android:paddingVertical="10dp"
android:text="@string/tendency_splash_start_btn"
android:textColor="@color/white_000"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white_000">

</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_tendency_splash_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/tendency_splash_title"
android:gravity="center"
android:textColor="@color/gray_700"
android:layout_marginTop="236dp"
style="@style/TextAppearance.Doorip.Head3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<!--더미 이미지의 크기가 너무 커서 임시로 크기를 지정했습니다. 추후 이미자가 나온다면 wrap_content 사용 예정-->
<ImageView
android:layout_width="200dp"
android:layout_height="126dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_tendency_splash_title"
android:layout_marginTop="10dp"
android:src="@drawable/img_sign_in_main" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_tendency_splash_start"
style="@style/button_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="22dp"
android:background="@drawable/sel_rounded_corner_button"
android:paddingVertical="10dp"
android:text="@string/tendency_splash_start_btn"
android:textColor="@color/white_000"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

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

0 comments on commit d148793

Please sign in to comment.