MvvmCross / MvvmCross-AndroidSupport

Android support library packages for MvvmCross: The .NET MVVM framework for cross-platform solutions.
http://mvvmcross.com
15 stars 0 forks source link

Fragment Navigation issue #192

Closed nicolgit closed 8 years ago

nicolgit commented 8 years ago

Probably there is an problem in navigating fragments with MvvmCross 4. The issue is viewable also on droid sample support.

Sequence 1 (1) open app (2) tap on menu - compose message (activity) (3) press android back button (4) home page is shown (OK)

Sequence 2 (1) open app (2) tap on menu - settings (fragment) (3) press android back button (4) app exits My expectation is that fragment navigation supports back button. Is there something that I missed or is this a MvvmCross bug?

nmilcoff commented 8 years ago

Actually MvvmCross supports fragment navigation. Just add the parameter "addToBackStack: true" in this line:

https://github.com/MvvmCross/MvvmCross-AndroidSupport/blob/master/Samples/Example.Droid/Activities/Caching/MainActivityFragmentCacheInfoFactory.cs#L44

And the fragment transaction will be added to BackStack.

nicolgit commented 8 years ago

It works, thank you!