ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 220 forks source link

pop fragment with transitionOption not working #83

Closed rayhanuddin55 closed 5 years ago

rayhanuddin55 commented 7 years ago

pop fragment with transitionOption worked fine in version 2.0.1. But in the current version(2.0.2) push work with transition option but pop not.

sbfss commented 7 years ago

Any update?

ncapdevi commented 7 years ago

Apologies. I haven't actually had a chance to look into this yet. Will try to do so in the coming days.

porkyhead commented 6 years ago

I also having trouble getting the correct behavior when using tranistionOption. I am not able to get the return transition working with a shared element. Any suggestions or progress on this issue?

asshyy-ktz commented 6 years ago

its not a bug, it seems the interface containing pushFragment() & popFragment() having only pushFragment() method. only update the interface named "FragmentNavigation" in BaseFragement class by declaring function named " void popFragment(); " then just implement popFragment() method in the class in which you implement this interface.

after updating sample code it look like:

public interface FragmentNavigation { void pushFragment(Fragment fragment); void popFragment(); }

@Override
public void popFragment() {
    if (mNavController != null) {
        mNavController.popFragment();
    }
}
ncapdevi commented 6 years ago

@ismaielsharif Your comment isn't relevant for the transactionOptions which is the original issue, and your provided solution is only necessary if the fragments themselves need to initiate a pop, which is rarely the case as it's often handled by the Activity and back navigation as can be seen in BottomTabsActivity.kt

   override fun onBackPressed() {
        if (fragNavController?.popFragment()?.not() == true) {
            super.onBackPressed()
        }
    }

This issue is for discussion a problem with transitionOptions, not general pop navigation

ncapdevi commented 6 years ago

I believe this issue has been corrected, but if it hasn't please comment and I'll reopen

sebastianmarschall commented 6 years ago

the issue still persists in 2.4.0 please reopen @ncapdevi

diogojg commented 6 years ago

Yes, I have the same issue. Any workaround?

diogojg commented 6 years ago

@rayhanuddin55 I can't even get it to work on back press on the version you mentioned '2.0.1'. The shared elements transition works well on pushing a new fragment, but when I do popFragment() only the typical Fade animation is performed, and no shared elements in the transition.

porkyhead commented 6 years ago

Same issue here as described by @diogojg

@rayhanuddin55 or @ncapdevi Will you reopen this issue?

fr-hyun commented 6 years ago

Is there someone or project to fix this issue? I want to help to solve this

ugurcany commented 6 years ago

+1

ncapdevi commented 5 years ago

Should be fixed in 3.1.0 #187

javad-vovin commented 5 years ago

I still have this issue, after updating to 3.1.0

porkyhead commented 5 years ago

Still cannot get it to work with 3.1.0.

@ncapdevi Do you have a sample showing how it should be done in 3.1.0?

mecoFarid commented 5 years ago

Using the latest 3.2.0 version popAnimation is still not working.

khunzohn commented 4 years ago

Yet not working for 3.3.0