TP-60065 | PS | fix MPS enter transition (#10766)

This commit is contained in:
Prakhar Saxena
2024-05-09 16:53:31 +05:30
committed by GitHub
parent abdc163c1e
commit f46d21b94c
4 changed files with 19 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.navi.common.model.ModuleNameV2
import com.navi.common.ui.activity.BaseActivity
import com.navi.pay.common.theme.NaviPayMaterialTheme
import com.navi.payment.nativepayment.model.NaviPaymentScreenType
import com.navi.payment.R
import com.navi.payment.nativepayment.router.NaviPaymentRouter
import com.navi.payment.nativepayment.screens.NaviPaymentMainScreen
import com.navi.payment.nativepayment.viewmodel.PaymentViewModel
@@ -44,6 +44,7 @@ class NaviPaymentActivity : BaseActivity() {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}
super.onCreate(savedInstanceState)
overridePendingTransition(R.anim.fade_in, 0)
setContent {
val customerStatusRoute = NaviPaymentRouter.getRouteFromCtaUrl(viewModel.getScreenType())
NaviPayMaterialTheme {

View File

@@ -390,7 +390,6 @@ fun MPSScreen(
}
is MPSScreenUtils.MPSScreenType.NonOnboarded -> {
sendLatencyEvent(paymentViewModel)
MPSNonOnboardedView(
mainCtaState = mainCtaState,
paymentAmount = paymentAmount,
@@ -401,10 +400,10 @@ fun MPSScreen(
onOtherMethodsClick = onOtherMethodsClick,
onDismissClicked = onBackClick
)
sendLatencyEvent(paymentViewModel)
}
is MPSScreenUtils.MPSScreenType.Onboarded -> {
sendLatencyEvent(paymentViewModel)
MPSOnboardedView(
mainCtaState = mainCtaState,
paymentAmount = paymentAmount,
@@ -419,6 +418,7 @@ fun MPSScreen(
onBankAccountSelected = onBankAccountSelected,
onDismissClicked = onBackClick
)
sendLatencyEvent(paymentViewModel)
}
is MPSScreenUtils.MPSScreenType.Feedback -> {
@@ -439,7 +439,6 @@ fun MPSScreen(
}
is MPSScreenUtils.MPSScreenType.Error -> {
sendLatencyEvent(paymentViewModel)
val errorData =
(bottomSheetStateHolder.bottomSheetUIState as MPSScreenUtils.MPSScreenType.Error).errorData
paymentViewModel.sendEvent(
@@ -459,7 +458,6 @@ fun MPSScreen(
secondaryButtonText = if (errorData?.feedbackConfig.isNotNull()) "Report an issue" else "Cancel",
onPrimaryButtonClicked = {
onOtherMethodsClick()
onBackClick()
},
onSecondaryButtonClicked = {
if (errorData?.feedbackConfig.isNotNull()) {
@@ -475,6 +473,7 @@ fun MPSScreen(
},
onDismissClicked = onBackClick
)
sendLatencyEvent(paymentViewModel)
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:duration="200"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set>