diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/GroupListActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/GroupListActivity.kt index 753478e7..2075784f 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/GroupListActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/GroupListActivity.kt @@ -57,7 +57,6 @@ class GroupListActivity : BindingActivity(R.layout.act private fun initEvent() { binding.ivClose.setOnClickListener { finish() - closeActivitySlideAnimation() } } @@ -105,6 +104,11 @@ class GroupListActivity : BindingActivity(R.layout.act }) } + override fun finish() { + super.finish() + closeActivitySlideAnimation() + } + companion object { fun getIntent(context: Context, title: String, type: Int) = Intent(context, GroupListActivity::class.java).apply { diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/GroupDetailActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/GroupDetailActivity.kt index 2e3c0207..b2a11ff6 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/GroupDetailActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/GroupDetailActivity.kt @@ -31,6 +31,11 @@ class GroupDetailActivity : viewModel.getGroup(meetingId) } + override fun finish() { + super.finish() + closeActivitySlideAnimation() + } + companion object { fun getIntent(context: Context, meetingId: Long) = Intent(context, GroupDetailActivity::class.java).apply { diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/JoinFriendListActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/JoinFriendListActivity.kt index 2a9e8f8b..ebbf370c 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/JoinFriendListActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/JoinFriendListActivity.kt @@ -40,7 +40,6 @@ class JoinFriendListActivity : useRippleEffect = false, clickEvent = { finish() - closeActivitySlideAnimation() } ) ) @@ -75,6 +74,11 @@ class JoinFriendListActivity : }.attach() } + override fun finish() { + super.finish() + closeActivitySlideAnimation() + } + companion object { fun getIntent(context: Context, friendListJson: String) = Intent(context, JoinFriendListActivity::class.java).apply { diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/check/GroupMeetCheckActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/check/GroupMeetCheckActivity.kt index 6fe6a295..fccf21f9 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/check/GroupMeetCheckActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/check/GroupMeetCheckActivity.kt @@ -47,7 +47,6 @@ class GroupMeetCheckActivity : useRippleEffect = false, clickEvent = { finish() - closeActivitySlideAnimation() } ) ) @@ -80,6 +79,11 @@ class GroupMeetCheckActivity : }.launchIn(lifecycleScope) } + override fun finish() { + super.finish() + closeActivitySlideAnimation() + } + companion object { fun getIntent(context: Context, meetingId: Long) = Intent(context, GroupMeetCheckActivity::class.java).apply { diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/complete/GroupMeetCompleteActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/complete/GroupMeetCompleteActivity.kt index b5666554..54172dfe 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/join/complete/GroupMeetCompleteActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/join/complete/GroupMeetCompleteActivity.kt @@ -47,7 +47,6 @@ class GroupMeetCompleteActivity : useRippleEffect = false, clickEvent = { finish() - closeActivitySlideAnimation() } ) ) @@ -91,6 +90,11 @@ class GroupMeetCompleteActivity : openActivitySlideAnimation() } + override fun finish() { + super.finish() + closeActivitySlideAnimation() + } + companion object { fun getIntent(context: Context, meetingId: Long) = Intent(context, GroupMeetCompleteActivity::class.java).apply { diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/group/search/SearchActivity.kt b/app/src/main/java/com/teumteum/teumteum/presentation/group/search/SearchActivity.kt index 0c79854f..3c06f060 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/group/search/SearchActivity.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/group/search/SearchActivity.kt @@ -79,7 +79,6 @@ class SearchActivity : BindingActivity(R.layout.activity_ binding.ivBack.setOnClickListener { finish() - closeActivitySlideAnimation() } } @@ -129,4 +128,9 @@ class SearchActivity : BindingActivity(R.layout.activity_ } }) } + + override fun finish() { + super.finish() + closeActivitySlideAnimation() + } } \ No newline at end of file diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimConfirm.kt b/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimConfirm.kt index c8281526..b3042333 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimConfirm.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/moim/MoimConfirm.kt @@ -1,6 +1,7 @@ package com.teumteum.teumteum.presentation.moim import android.app.Activity +import androidx.activity.compose.BackHandler import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -70,7 +71,7 @@ fun MoimConfirm(viewModel: MoimViewModel, activity: Activity, isJoinView: Boolea onClick = { activity.finish() (activity as? BindingActivity<*>)?.closeActivitySlideAnimation() - } + }, ) { val scrollState = rememberScrollState() Column( @@ -110,6 +111,11 @@ fun MoimConfirm(viewModel: MoimViewModel, activity: Activity, isJoinView: Boolea } } } + BackHandler { + // Handle the back button press + activity.finish() + (activity as? BindingActivity<*>)?.closeActivitySlideAnimation() + } } @OptIn(ExperimentalPagerApi::class) diff --git a/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendDetailScreen.kt b/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendDetailScreen.kt index 33f7e4f0..fc6dcfa6 100644 --- a/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendDetailScreen.kt +++ b/app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendDetailScreen.kt @@ -1,6 +1,7 @@ package com.teumteum.teumteum.presentation.mypage import android.app.Activity +import androidx.activity.compose.BackHandler import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -118,6 +119,11 @@ fun RecommendDetailScreen( } } + BackHandler { + // Handle the back button press + activity.finish() + (activity as? BindingActivity<*>)?.closeActivitySlideAnimation() + } } @Composable