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

Navigation Layout's Header is not showing #54

Open
jdluzen opened this issue Feb 7, 2016 · 2 comments
Open

Navigation Layout's Header is not showing #54

jdluzen opened this issue Feb 7, 2016 · 2 comments

Comments

@jdluzen
Copy link

jdluzen commented Feb 7, 2016

I've rebased on top of XF2, but it seems that Navigation Layout's Header is not showing up in my app or the demo. I can see it being added to the control in NavigationLayoutRenderer.UpdateHeaderView. Anyone have any suggestions on where to look?

@jdluzen
Copy link
Author

jdluzen commented Feb 10, 2016

I can manually add native Views in the renderer, and they show up. But not when I try to GetNativeView() from the HeaderView in NavigationLayoutRenderer.cs. It seems to be some kind of interaction with XF and native Views. Also, this might be related: https://code.google.com/p/android/issues/detail?id=190226

@jdluzen
Copy link
Author

jdluzen commented Apr 3, 2016

Huzzah! The issue is that in UpdateHeaderView, the (possibly) nested controls that are supposed to go in the Header, aren't converted to native fully, or the hierarchy of native controls isn't set up or something.
This seems to work:
var header = this.Element.HeaderView.GetNativeView(); var temp = Element.HeaderView.Content.GetNativeView(); LinearLayout llc = new LinearLayout(Forms.Context) { LayoutParameters = new LayoutParams(LinearLayoutCompat.LayoutParams.MatchParent, 400) }; temp.RemoveFromParent(); llc.AddView(temp); this.Control.AddHeaderView(llc);

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

1 participant