diff --git a/app/src/main/java/com/runnect/runnect/presentation/mydrawdetail/MyDrawDetailActivity.kt b/app/src/main/java/com/runnect/runnect/presentation/mydrawdetail/MyDrawDetailActivity.kt index 34eb4f649..fc0addb08 100644 --- a/app/src/main/java/com/runnect/runnect/presentation/mydrawdetail/MyDrawDetailActivity.kt +++ b/app/src/main/java/com/runnect/runnect/presentation/mydrawdetail/MyDrawDetailActivity.kt @@ -43,6 +43,11 @@ class MyDrawDetailActivity : deleteButton() } + private fun finishViewAnimLeftRight() { + finish() + overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right) + } + private fun deletingDialog() { val (dialog, dialogLayout) = setActivityDialog( layoutInflater = layoutInflater, @@ -58,8 +63,7 @@ class MyDrawDetailActivity : putExtra(EXTRA_FRAGMENT_REPLACEMENT_DIRECTION, "fromDeleteMyDrawDetail") } startActivity(intent) - finish() - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right) + finishViewAnimLeftRight() } this.btn_delete_no.setOnClickListener { dialog.dismiss() @@ -76,15 +80,13 @@ class MyDrawDetailActivity : private fun backButton() { //png가 imgBtn으로 하면 잘리길래 어차피 임시로 해놓는 거니까 imgView로 component를 추가해줬음 binding.imgBtnBack.setOnClickListener { - finish() - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right) + finishViewAnimLeftRight() } } private val backPressedCallback = object : OnBackPressedCallback(true) { override fun handleOnBackPressed() { - finish() - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right) + finishViewAnimLeftRight() } }