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

No example of MvxHostFragment. #1

Open
kjeremy opened this issue Jul 22, 2014 · 4 comments
Open

No example of MvxHostFragment. #1

kjeremy opened this issue Jul 22, 2014 · 4 comments

Comments

@kjeremy
Copy link

kjeremy commented Jul 22, 2014

Does MvxHostFragment work? I'm struggling to come up with a way to load up a fragment (by a navigation drawer for example) but have that second fragment load sub fragments. For instance if the second fragment is a master-detail view and the detail view is a fragment.

@JelleDamen
Copy link
Owner

Yes, it should work.

I once used it in a master-detail-view composition where the detail view
was a fragment, which also hosted other fragments.

Do you have any errors? Let me know ;)

Jelle

On Tue, Jul 22, 2014 at 9:00 PM, Jeremy Kolb notifications@github.com
wrote:

Does MvxHostFragment work? I'm struggling to come up with a way to load
up a fragment (by a navigation drawer for example) but have that second
fragment load sub fragments. For instance if the second fragment is a
master-detail view and the detail view is a fragment.


Reply to this email directly or view it on GitHub
#1.

@chris1988
Copy link

I Have the same Problem. Can't get the MvxHostFragment to work. Any ideas?

http://pastebin.com/7eqB80rP

@JelleDamen
Copy link
Owner

Hi Chris,

In your pastbin example, you are only registering 1 type of viewmodel to be hosted in the hostview.

Take a look at the constructor of the HostView in my sample (https://github.com/JelleDamen/CustomMvxAndroidPresenter/blob/master/CustomMvxAndroidPresenterSample/Pizza.Droid.UI/Views/HostView.cs)

there you see, that I registered 4 different types of ViewModels.

@chris1988
Copy link

Thanks for the fast replay :)

I have got the MvxActivityHostFragment to work but struggling on getting the MvxHostFragment to work. The show method is newer called and the OnCreate method is called before the OnCreateView. Maybe it has something do do with that. See my Gist

https://gist.github.com/chris1988/75f8c6c10916d6d57762

Keep the good work up!

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

No branches or pull requests

3 participants