Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design/#12] 답변 화면 UI 구현 #13

Merged
merged 11 commits into from
Jul 6, 2023
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
android:name=".presentation.onboarding.NotifyTimeActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".presentation.AnswerActivity"
android:exported="false"
android:screenOrientation="portrait" />
</application>

</manifest>
3 changes: 2 additions & 1 deletion app/src/main/java/com/sopt/umbba_android/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package com.sopt.umbba_android
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.sopt.umbba_android.presentation.AnswerActivity
import com.sopt.umbba_android.presentation.onboarding.NotifyTimeActivity

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
startActivity(Intent(this, NotifyTimeActivity::class.java))
startActivity(Intent(this, AnswerActivity::class.java))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.sopt.umbba_android.presentation

import com.sopt.umbba_android.R
import com.sopt.umbba_android.databinding.ActivityAnswerBinding
import com.sopt.umbba_android.util.binding.BindingActivity

class AnswerActivity: BindingActivity<ActivityAnswerBinding>(R.layout.activity_answer) {
}
5 changes: 5 additions & 0 deletions app/src/main/res/color/sel_answer_input_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/grey_500" android:state_focused="true" />
<item android:color="@color/grey_500" android:state_hovered="true" />
<item android:color="@color/grey_500" android:state_hovered="true" />
</selector>
1 change: 1 addition & 0 deletions app/src/main/res/color/sel_invite_code_input_layout.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/grey_300" android:state_focused="true" />
<item android:color="@color/grey_300" android:state_hovered="true" />
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_check.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M8.795,15.875L4.625,11.705L3.205,13.115L8.795,18.705L20.795,6.705L19.385,5.295L8.795,15.875Z"
android:fillColor="#575757"/>
</vector>
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/shape_grey_appbar_r68_rect.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="68dp" />
<solid android:color="@color/grey_500" />
</shape>
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/shape_grey_fill_r17_rect.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="17dp" />
<solid android:color="@color/grey_500" />
</shape>
95 changes: 95 additions & 0 deletions app/src/main/res/layout/activity_answer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?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"
xmlns:tool="http://schemas.android.com/tools">

<data>

<variable
name="titleText"
type="String" />

<variable
name="visibleCheck"
type="java.lang.Boolean" />

<variable
name="title"
type="String" />
</data>

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

<include
android:id="@+id/layout_appbar"
layout="@layout/qna_appbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:titleText="@{`#1 나의 어린시절`}"
app:visibleCheck="@{true}" />

<TextView
android:id="@+id/tv_title"
style="@style/BrandTypeBigRegular20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/answer_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/layout_appbar" />

<TextView
android:id="@+id/tv_question"
style="@style/AndroidSubHead1SemiBold20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="19dp"
android:text="@string/answer_question"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/shape_grey_fill_r17_rect"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_question">

<com.google.android.material.textfield.TextInputLayout
style="@style/AnswerTextInputLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="16dp"
app:boxStrokeWidth="0dp"
app:hintAnimationEnabled="false"
app:hintEnabled="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="@string/answer_edittext_hint"
android:minHeight="172dp"
android:textAppearance="@style/AndroidBody1_2Regular16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_invite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginBottom="12dp"
android:background="@drawable/sel_invite_code_btn_next"
android:background="@drawable/sel_btn_next"
android:enabled="true"
android:text="@string/btn_start"
android:textColor="@color/white"
app:layout_constraintBottom_toTopOf="@id/tv_or" />

<TextView
android:id="@+id/tv_or"
style="@style/AndroidBody2_2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
Expand All @@ -60,7 +60,7 @@

<TextView
android:id="@+id/tv_receive_code"
style="@style/AndroidBody2_2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_invite_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_code"
style="@style/AndroidBody2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/invite_code_hint"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_notify_time.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:lineSpacingExtra="8dp"
android:layout_marginTop="18dp"
android:lineSpacingExtra="8dp"
android:text="@string/go_past_title"
android:textColor="@color/black"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/basic_appbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<TextView
android:id="@+id/tv_appbar_title"
style="@style/AndroidBody2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{titleText == null ? null : titleText}"
Expand Down
14 changes: 7 additions & 7 deletions app/src/main/res/layout/fragment_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<TextView
android:id="@+id/tv_notification"
style="@style/AndroidBody2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
Expand All @@ -49,14 +49,14 @@

<Switch
android:id="@+id/switch_notification"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_width="80dp"
android:layout_height="54dp"
android:layout_marginTop="22dp"
android:layout_marginEnd="27dp"
android:layout_marginBottom="21dp"
android:gravity="center"
android:showText="true"
android:switchTextAppearance="@style/AndroidCaptionRegular12"
android:switchTextAppearance="@style/AndroidCaptionRegular10"
android:thumb="@drawable/shape_switch_thumb"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -75,7 +75,7 @@

<TextView
android:id="@+id/tv_about_umbba"
style="@style/AndroidBody2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
Expand Down Expand Up @@ -106,7 +106,7 @@

<TextView
android:id="@+id/tv_tos"
style="@style/AndroidBody2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
Expand Down Expand Up @@ -138,7 +138,7 @@

<TextView
android:id="@+id/tv_notice"
style="@style/AndroidBody2Regular16"
style="@style/AndroidBody1_2Regular16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
Expand Down
78 changes: 78 additions & 0 deletions app/src/main/res/layout/qna_appbar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools">

<data>

<import type="android.view.View" />

<variable
name="titleText"
type="String" />

<variable
name="visibleCheck"
type="java.lang.Boolean" />
</data>

<com.google.android.material.appbar.AppBarLayout 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="60dp">

<androidx.appcompat.widget.Toolbar
style="@style/toolbar"
android:layout_height="60dp"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

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

<ImageView
android:id="@+id/iv_back"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_arrow_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="160dp"
android:layout_height="30dp"
android:background="@drawable/shape_grey_appbar_r68_rect"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<TextView
android:id="@+id/tv_appbar_title"
style="@style/BrandTypeSmallSemiBold16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{titleText == null ? null : titleText}"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="#1 나의 어린시절" />

</androidx.constraintlayout.widget.ConstraintLayout>

<ImageView
android:id="@+id/iv_check"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="16dp"
android:src="@drawable/ic_check"
android:visibility="@{visibleCheck ? View.VISIBLE : View.GONE }"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
</layout>
16 changes: 8 additions & 8 deletions app/src/main/res/values/fonts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,13 @@
<item name="android:textSize">20sp</item>
</style>

<style name="AndroidBody1SemiBold16">
<style name="AndroidBody1_1SemiBold16">
<item name="android:fontFamily">@font/pretendard_semibold</item>
<item name="android:textStyle">normal</item>
<item name="android:textSize">16sp</item>
</style>

<style name="AndroidBody2_1SemiBold16">
<item name="android:fontFamily">@font/pretendard_semibold</item>
<item name="android:textStyle">normal</item>
<item name="android:textSize">16sp</item>
</style>

<style name="AndroidBody2_2Regular16">
<style name="AndroidBody1_2Regular16">
<item name="android:fontFamily">@font/pretendard_regular</item>
<item name="android:textStyle">normal</item>
<item name="android:textSize">16sp</item>
Expand Down Expand Up @@ -73,6 +67,12 @@
<item name="android:textSize">12sp</item>
</style>

<style name="AndroidCaptionRegular10">
<item name="android:fontFamily">@font/pretendard_regular</item>
<item name="android:fontStyle">normal</item>
<item name="android:textSize">10sp</item>
</style>

<style name="BrandTypeBigRegular20">
<item name="android:fontFamily">@font/cafe24_classic_type</item>
<item name="android:fontStyle">normal</item>
Expand Down
Loading