[Android] Fix starting menu icon color#93
Conversation
| private DrawerLayout mDrawerLayout; | ||
| private ActionBarDrawerToggle mDrawerToggle; | ||
| private ArrayList<View> mMenuItems; | ||
| private int mButtonColor; |
There was a problem hiding this comment.
@jskuby Lets not keep this as a member since we use it only in a single function
There was a problem hiding this comment.
@guyca When calling setNavUpButton without a screen it's implied we're navigating back. Having no screen object also uses the default color when styling the icon, which may not have been the color of the previous screen's menu icon. This may just be more of an argument for a previous comment of mine mentioning splitting up setNavUpButton into separate style and state methods.
There was a problem hiding this comment.
hmm.. the next developer who would step into the code won't know that passing null to setNavUpButton implies it's called after navigating back.
Maybe if the screen is null - don't style the up button. Instead, we can style it in setStyle which is called after StyleHelper.updateStyles is called.
wdyt?
There was a problem hiding this comment.
I like it. That also means we don't need to pass screen into setNavUpButton, it just needs to be able to set the correct state.
|
Pretty sure this will be resolved with the updates from PR #97. |
The navBarButtonColor was only being applied to screens after the first. The fix ensures the color is applied to the starting screen as well.