Skip to content

Conversation

@hboon
Copy link
Collaborator

@hboon hboon commented Dec 16, 2016

No description provided.

@hboon
Copy link
Collaborator Author

hboon commented Dec 16, 2016

Shucks. Hold this, please. Might have introduced a bug.

@hboon
Copy link
Collaborator Author

hboon commented Dec 17, 2016

Done!

This approach isn't quite so efficient because whenever show_bar() or hide_bar() is called, we update the heights of every screen (fragment) in the navigation stack and re-layout them. We can probably have a flag to defer to re-layout, haven't added it for simplicity. I can't figure out a more elegant way though.

Someone review this? :)

@lrz
Copy link
Member

lrz commented Dec 17, 2016

Looks good. I would suggest to cache the result in UI::Navigation.bar_height as this may be called multiple times and the value seems to be constant.

@hboon
Copy link
Collaborator Author

hboon commented Dec 17, 2016

Hmm.. I suppose the bar height might change if the user changes their theme? (but that will probably break this code anyway so maybe that doesn't matter...). Will follow soon with a commit.

@hboon hboon force-pushed the android-screen-height-wrong branch from 56835b3 to 036805d Compare December 17, 2016 16:34
@hboon
Copy link
Collaborator Author

hboon commented Dec 17, 2016

Bar height now cached.

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

Successfully merging this pull request may close these issues.

2 participants