From e76cd69fc158b2f4f4807131cdccd456764bc741 Mon Sep 17 00:00:00 2001 From: crownjoe Date: Tue, 9 Jan 2024 00:43:04 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT/#37]=20splash=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/starttrip/StartTripSplashActivity.kt | 2 +- .../starttrip/createtrip/CreateTripActivity.kt | 11 +++++++++++ .../main/res/layout/activity_start_trip_splash.xml | 5 ++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/presentation/src/main/java/com/going/presentation/starttrip/StartTripSplashActivity.kt b/presentation/src/main/java/com/going/presentation/starttrip/StartTripSplashActivity.kt index 7129747e..7e220671 100644 --- a/presentation/src/main/java/com/going/presentation/starttrip/StartTripSplashActivity.kt +++ b/presentation/src/main/java/com/going/presentation/starttrip/StartTripSplashActivity.kt @@ -22,8 +22,8 @@ class StartTripSplashActivity : Intent(this, CreateTripActivity::class.java).apply { startActivity(this) } + finish() } - finish() } private fun initEnterTripBtnClickListener() { diff --git a/presentation/src/main/java/com/going/presentation/starttrip/createtrip/CreateTripActivity.kt b/presentation/src/main/java/com/going/presentation/starttrip/createtrip/CreateTripActivity.kt index b4428b04..3fe57da2 100644 --- a/presentation/src/main/java/com/going/presentation/starttrip/createtrip/CreateTripActivity.kt +++ b/presentation/src/main/java/com/going/presentation/starttrip/createtrip/CreateTripActivity.kt @@ -1,5 +1,6 @@ package com.going.presentation.starttrip.createtrip +import android.content.Intent import android.os.Bundle import android.widget.TextView import androidx.activity.viewModels @@ -7,6 +8,7 @@ import androidx.core.content.res.ResourcesCompat import com.going.domain.entity.NameState import com.going.presentation.R import com.going.presentation.databinding.ActivityCreateTripBinding +import com.going.presentation.starttrip.StartTripSplashActivity import com.going.ui.base.BaseActivity import com.going.ui.extension.setOnSingleClickListener @@ -20,6 +22,7 @@ class CreateTripActivity : override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + initBackBtnClickListener() initBindingViewModel() observeIsNameAvailable() observeCheckStartDateAvailable() @@ -29,6 +32,14 @@ class CreateTripActivity : initNextBtnClickListener() } + private fun initBackBtnClickListener(){ + binding.tbCreateTrip.setNavigationOnClickListener() { + Intent(this, StartTripSplashActivity::class.java).apply { + startActivity(this) + } + finish() + } + } private fun initBindingViewModel() { binding.viewModel = viewModel } diff --git a/presentation/src/main/res/layout/activity_start_trip_splash.xml b/presentation/src/main/res/layout/activity_start_trip_splash.xml index 6c129438..778788e1 100644 --- a/presentation/src/main/res/layout/activity_start_trip_splash.xml +++ b/presentation/src/main/res/layout/activity_start_trip_splash.xml @@ -6,11 +6,10 @@ - + android:background="@color/white_000">