Solution 1 :
This helped me, try to change the animation in navGraph:
<action
android_id="@+id/action_mainFragment_to_detailsFragment"
app_destination="@id/detailsFragment"
app_enterAnim="@android:anim/slide_in_left"
app_exitAnim="@anim/nav_default_exit_anim"
app_popEnterAnim="@anim/nav_default_pop_enter_anim"
app_popExitAnim="@anim/nav_default_pop_exit_anim" />
Problem :
The fragment is overlapping on another fragment during the transition. How can I fix it?
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initAdapter()
newsAdapter.setOnItemClickListener {
val bundle = bundleOf("article" to it)
view.findNavController().navigate(
R.id.action_mainFragment_to_detailsFragment,
bundle
)
}
Comments
Comment posted by TheLibrarian
What do you mean by “during” transition? Do you want just blink it or what?
Comment posted by HIDDENPOOL
As I move from one fragment to another, they merge. is it understandble? (sry for my bad eng)
Comment posted by imgur.com/vJQcvCD
Comment posted by TheLibrarian
Oh, your second fragment doesn’t have a background.
Comment posted by cactustictacs
Yeah, give the fragment’s main layout a