Skip to content

Commit

Permalink
[MERGE] #114 -> develop
Browse files Browse the repository at this point in the history
[UI/#114] ์—ฌํ–‰ ์ž…์žฅ ๋ทฐ / ํ† ์ŠคํŠธ ์œ„์น˜ ์ˆ˜์ •
  • Loading branch information
crownjoe authored Jan 15, 2024
2 parents f000926 + d802df3 commit 826987e
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.going.presentation.entertrip.createtrip.choosedate

import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.View
import com.going.presentation.R
import com.going.presentation.databinding.FragmentBottomSheetDateContentBinding
import com.going.ui.base.BaseBottomSheet
import com.going.ui.extension.setOnSingleClickListener
import com.going.ui.extension.toast
import java.util.Calendar

class BottomSheetDateContentFragment(val viewModel: CreateTripViewModel, val isStart: Boolean) :
Expand Down Expand Up @@ -55,7 +56,11 @@ class BottomSheetDateContentFragment(val viewModel: CreateTripViewModel, val isS
if (startDate.before(endDate)) {
dismiss()
} else {
toast(getString(R.string.create_trip_toast_error))
binding.viewBlank.visibility = View.VISIBLE
binding.tvErrorToast.visibility = View.VISIBLE
Handler(Looper.getMainLooper()).postDelayed({
binding.tvErrorToast.visibility = View.INVISIBLE
}, 2000)
}
} else {
dismiss()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp"/>
<stroke android:color="@color/gray_700"/>
<solid android:color="@color/gray_700" />
<corners android:radius="4dp" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<stroke android:color="@color/gray_100"/>
<solid android:color="@color/white_000" />
<corners android:radius="4dp" />
</shape>
</shape>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/transparent_60" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/white_000" />
<corners
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>
</item>
</layer-list>
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,76 @@

<data>

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

<import type="com.going.domain.entity.NameState" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_top40_white000_fill"
android:paddingBottom="22dp">
android:background="@color/transparent_60">

<DatePicker
android:id="@+id/dp_create_trip_date"
<TextView
android:id="@+id/tv_error_toast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:calendarTextColor="@color/gray_700"
android:calendarViewShown="false"
android:datePickerMode="spinner"
android:headerDayOfMonthTextAppearance="@style/TextAppearance.Doorip.Body2.Medi"
android:headerMonthTextAppearance="@style/TextAppearance.Doorip.Body2.Medi"
android:headerYearTextAppearance="@style/TextAppearance.Doorip.Body2.Medi"
android:spinnersShown="true"
android:background="@drawable/shape_rect_4_gray700_fill"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp"
android:text="@string/create_trip_toast_error"
android:textColor="@color/white_000"
android:visibility="gone"
android:layout_marginBottom="22dp"
app:layout_constraintBottom_toTopOf="@id/view_blank"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/btn_create_trip_finish"
style="@style/TextAppearance.Doorip.Body2.Bold"
android:layout_width="0dp"
<View
android:id="@+id/view_blank"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/layout_date_picker"
android:layout_width="match_parent"
android:layout_height="22dp"/>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_date_picker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginTop="40dp"
android:background="@drawable/sel_rounded_corner_button"
android:gravity="center"
android:paddingVertical="13dp"
android:text="@string/date_content_btn"
android:textColor="@color/white_000"
android:background="@drawable/shape_rect_top4_white000_fill"
android:paddingBottom="22dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dp_create_trip_date" />
app:layout_constraintTop_toBottomOf="@+id/tv_error_toast">

<DatePicker
android:id="@+id/dp_create_trip_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:calendarTextColor="@color/gray_700"
android:calendarViewShown="false"
android:datePickerMode="spinner"
android:headerDayOfMonthTextAppearance="@style/TextAppearance.Doorip.Body2.Medi"
android:headerMonthTextAppearance="@style/TextAppearance.Doorip.Body2.Medi"
android:headerYearTextAppearance="@style/TextAppearance.Doorip.Body2.Medi"
android:spinnersShown="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/btn_create_trip_finish"
style="@style/TextAppearance.Doorip.Body2.Bold"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginTop="40dp"
android:background="@drawable/sel_rounded_corner_button"
android:gravity="center"
android:paddingVertical="13dp"
android:text="@string/create_trip_finish_btn"
android:textColor="@color/white_000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dp_create_trip_date" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_top40_white000_fill"
android:background="@drawable/shape_rect_top4_white000_fill"
android:paddingBottom="22dp">

<DatePicker
Expand Down Expand Up @@ -46,4 +46,4 @@

</androidx.constraintlayout.widget.ConstraintLayout>

</layout>
</layout>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_rect_top40_white000_fill"
android:background="@drawable/shape_rect_top4_white000_fill"
android:paddingBottom="22dp">

<DatePicker
Expand Down Expand Up @@ -46,4 +46,4 @@

</androidx.constraintlayout.widget.ConstraintLayout>

</layout>
</layout>

0 comments on commit 826987e

Please sign in to comment.