Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pop fragment with transitionOption not working #83

Closed
rayhanuddin55 opened this issue Jul 25, 2017 · 17 comments
Closed

pop fragment with transitionOption not working #83

rayhanuddin55 opened this issue Jul 25, 2017 · 17 comments
Assignees
Labels

Comments

@rayhanuddin55
Copy link

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.

@ncapdevi ncapdevi self-assigned this Aug 7, 2017
@sbfss
Copy link
Contributor

sbfss commented Oct 3, 2017

Any update?

@ncapdevi
Copy link
Owner

ncapdevi commented Oct 3, 2017

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

@ncapdevi ncapdevi added the bug label Oct 3, 2017
@porkyhead
Copy link

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
Copy link

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
Copy link
Owner

@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
Copy link
Owner

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

@sebastianmarschall
Copy link

sebastianmarschall commented Mar 6, 2018

the issue still persists in 2.4.0
please reopen @ncapdevi

@diogojg
Copy link

diogojg commented Mar 22, 2018

Yes, I have the same issue. Any workaround?

@diogojg
Copy link

diogojg commented Mar 22, 2018

@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
Copy link

Same issue here as described by @diogojg

@rayhanuddin55 or @ncapdevi Will you reopen this issue?

@ncapdevi ncapdevi reopened this Jun 24, 2018
@fr-hyun
Copy link

fr-hyun commented Jul 20, 2018

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

@ugurcany
Copy link

+1

@ncapdevi
Copy link
Owner

Should be fixed in 3.1.0 #187

@javad-vovin
Copy link

I still have this issue, after updating to 3.1.0

@porkyhead
Copy link

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
Copy link

Using the latest 3.2.0 version popAnimation is still not working.

@khunzohn
Copy link

Yet not working for 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests