i want to make animation transition between fragment and activity, there is no errors but the animation does not work, the intent work without animation.
i tried this code
// Start ChechoutActivity after itemList is populated
val intent = Intent(requireActivity(), ChechoutActivity::class.java)
intent.putExtra("itemList", itemList)
// Apply fade-in and fade-out animations to the intent
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent)
// Set custom animations immediately after starting the activity
requireActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out)
and my animation xml for fade_in
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="750" />
fade_out
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="1.0" android:toAlpha="0.0"
android:fillAfter="true"
android:duration="750" />