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

Added support for nested fragments (ChildFragmentManager) #2482

Merged
merged 2 commits into from
Jan 10, 2018

Conversation

Qwin
Copy link

@Qwin Qwin commented Dec 20, 2017

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Feature

⤵️ What is the current behavior?

Current behavior only supports FragmentManager and SupportFragmentManager on 1 nested level.
It also doesn't support nested fragments in PageViewer.

🆕 What is the new behavior (if this is a feature change)?

The new behavior adds support for nested fragments (multi level) (for now only MvxAppCompatPresenter supports it).
Adds correct tagging on MvxCachedFragmentPagerAdapter so that nested fragments can be supported in PageViewer.

💥 Does this PR introduce a breaking change?

Not yet (depends if we want to remove 2 of the PageAdapters into making only 2 available)

🐛 Recommendations for testing

📝 Links to relevant issues/docs

Problems with the Android API I am using (found this like 2 hours ago) :
https://stackoverflow.com/questions/6102007/is-there-a-way-to-get-references-for-all-currently-active-fragments-in-an-activi
When we look at the link above it seems that FragmentManager.Fragments is maybe not supposed to be used as its hidden (well its not really hidden in Xamarin). But I am concerned of future updates it might break the implementation. (if they end up making it private field). Also the non-AppCompat version we would need to use reflection to get the field with mActive as said per post. So I am not sure if this is a good solution.

🤔 Checklist before submitting

Didnt have time to do the below yet. I currently implemented it in my own project by just re-implementing the MvxCachedFragmentPagerAdapter and overwriting the MvxAppCompatPresenter. It works as far as I can see but to be added to MvvmCross it needs more work and maybe a different approach.

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated (docs style guide)
  • Nuspec files were updated (when applicable)
  • Rebased onto current develop

@Qwin Qwin changed the title Added support for nested fragments (ChildFragmentManager) (W.I.P) [W.I.P] Added support for nested fragments (ChildFragmentManager) Dec 20, 2017
@Cheesebaron Cheesebaron changed the title [W.I.P] Added support for nested fragments (ChildFragmentManager) [WIP] Added support for nested fragments (ChildFragmentManager) Dec 20, 2017
@martijn00 martijn00 added this to the 6.0.0 milestone Dec 20, 2017
@martijn00
Copy link
Contributor

Can you do a rebase?

@martijn00 martijn00 merged commit 4a1fae7 into MvvmCross:develop Jan 10, 2018
@martijn00 martijn00 changed the title [WIP] Added support for nested fragments (ChildFragmentManager) Added support for nested fragments (ChildFragmentManager) Jan 10, 2018
@nmilcoff nmilcoff added p/android Android platform p/android-support Android Support Packages platform labels Jan 10, 2018
@Qwin
Copy link
Author

Qwin commented Jan 10, 2018

@martijn00 sorry about that, I just saw your message. I been heavily boggled down with my company stories. Wish I had more time for this.

@Qwin Qwin deleted the supportnestedfragments branch January 10, 2018 16:53
@nmilcoff nmilcoff mentioned this pull request Feb 18, 2018
7 tasks
@nmilcoff nmilcoff added the t/feature Feature request type label Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/android Android platform p/android-support Android Support Packages platform t/feature Feature request type
Development

Successfully merging this pull request may close these issues.

3 participants