diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fc306df4..1910f388 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -98,6 +98,12 @@ android:exported="false" android:screenOrientation="portrait"/> + + + diff --git a/presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripActivity.kt b/presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripActivity.kt new file mode 100644 index 00000000..211438fa --- /dev/null +++ b/presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripActivity.kt @@ -0,0 +1,65 @@ +package com.going.presentation.starttrip.finishtrip + +import android.content.ClipData +import android.content.ClipboardManager +import android.content.Context +import android.content.Intent +import android.os.Bundle +import androidx.activity.viewModels +import com.going.presentation.R +import com.going.presentation.databinding.ActivityFinishTripBinding +import com.going.presentation.preferencetag.PreferenceTagActivity +import com.going.ui.base.BaseActivity +import com.going.ui.extension.setOnSingleClickListener + +class FinishTripActivity : + BaseActivity(R.layout.activity_finish_trip) { + private val viewModel by viewModels() + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + initCopyCodetvClickListener() + initSendCodeBtnClickListener() + initEnterTripBtnClickListener() + //checkDayLeft() + } + + private fun initCopyCodetvClickListener() { + binding.tvFinishTripTermsText.setOnSingleClickListener { + val clipboardManager = + this.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager + val clipData = ClipData.newPlainText("INVITE_CODE_LABEL", viewModel.INVITE_CODE) + clipboardManager.setPrimaryClip(clipData) + } + } + + private fun initSendCodeBtnClickListener() { + binding.btnFinishTripSendCode.setOnSingleClickListener { + //카카오톡으로 초대코드 보내기 + } + } + + private fun initEnterTripBtnClickListener() { + binding.btnFinishTripEnterTrip.setOnSingleClickListener { + Intent(this, PreferenceTagActivity::class.java).apply { + startActivity(this) + //입장 코드 받아서 보내기 + } + finish() + } + } + +// private fun checkDayLeft(){ +// 그 전 뷰에서 서버 붙여서 보내주는 day 값 알게 되면 맞게 로직 구현하겠습니다 +// if(dayLeft > 0) { +// binding.tvFinishTripDayLeft.text = dayLeft +// }else{ +// binding.tvFinishTripDayLeft.text = +// } +// } + companion object { + const val INVITE_CODE_LABEL = "Invite Code" + } +} + diff --git a/presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripViewModel.kt b/presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripViewModel.kt new file mode 100644 index 00000000..c356ba8d --- /dev/null +++ b/presentation/src/main/java/com/going/presentation/starttrip/finishtrip/FinishTripViewModel.kt @@ -0,0 +1,8 @@ +package com.going.presentation.starttrip.finishtrip + +import androidx.lifecycle.ViewModel + +class FinishTripViewModel : ViewModel(){ + val INVITE_CODE = "a1b2c3" +} + diff --git a/presentation/src/main/res/drawable/ic_finish_trip_copy.xml b/presentation/src/main/res/drawable/ic_finish_trip_copy.xml new file mode 100644 index 00000000..9cc5df41 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_finish_trip_copy.xml @@ -0,0 +1,10 @@ + + + diff --git a/presentation/src/main/res/drawable/ic_finish_trip_ticket_bottom.xml b/presentation/src/main/res/drawable/ic_finish_trip_ticket_bottom.xml new file mode 100644 index 00000000..8691eb1e --- /dev/null +++ b/presentation/src/main/res/drawable/ic_finish_trip_ticket_bottom.xml @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/presentation/src/main/res/drawable/ic_finish_trip_ticket_top.xml b/presentation/src/main/res/drawable/ic_finish_trip_ticket_top.xml new file mode 100644 index 00000000..fbe7797b --- /dev/null +++ b/presentation/src/main/res/drawable/ic_finish_trip_ticket_top.xml @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/presentation/src/main/res/drawable/ic_finish_trip_union.xml b/presentation/src/main/res/drawable/ic_finish_trip_union.xml new file mode 100644 index 00000000..4322e1a0 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_finish_trip_union.xml @@ -0,0 +1,10 @@ + + + diff --git a/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_8.xml b/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5.xml similarity index 77% rename from presentation/src/main/res/drawable/shape_line_gray100_fill_dash_8.xml rename to presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5.xml index 68041f1c..ee19d87a 100644 --- a/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_8.xml +++ b/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5.xml @@ -5,7 +5,7 @@ + android:dashWidth="5dp" + android:dashGap="5dp"/> \ No newline at end of file diff --git a/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5_vertical.xml b/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5_vertical.xml new file mode 100644 index 00000000..c69c0986 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_line_gray100_fill_dash_5_vertical.xml @@ -0,0 +1,5 @@ + + diff --git a/presentation/src/main/res/layout/activity_create_trip.xml b/presentation/src/main/res/layout/activity_create_trip.xml index 8240b81b..b08ee0ff 100644 --- a/presentation/src/main/res/layout/activity_create_trip.xml +++ b/presentation/src/main/res/layout/activity_create_trip.xml @@ -29,7 +29,7 @@ app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_back" app:title="@string/create_trip_tb_title" - app:titleTextColor="@color/black_000" /> + app:titleTextColor="@color/gray_700" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/fragment_bottom_sheet_date_content.xml b/presentation/src/main/res/layout/fragment_bottom_sheet_date_content.xml index 0dd1487c..eed1d54b 100644 --- a/presentation/src/main/res/layout/fragment_bottom_sheet_date_content.xml +++ b/presentation/src/main/res/layout/fragment_bottom_sheet_date_content.xml @@ -4,14 +4,8 @@ xmlns:tools="http://schemas.android.com/tools"> - - - - + android:src="@drawable/shape_line_gray100_fill_dash_5" /> diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index e5001792..cb7a3267 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -89,4 +89,13 @@ 새로운 여행 시작하기 여행 입장하기 + + 새로운 여행이 생성되었어요! + 굉굉이랑 스페인 + 친구 초대코드 + 초대코드 복사하기 + 카카오톡으로 초대코드 보내기 + 입장하기 + 초대코드가 복사되었어요. +