Android drawer implementation#82
Conversation
| }); | ||
| } | ||
|
|
||
| protected void setupDrawer(Drawer drawer, Screen screen) { |
There was a problem hiding this comment.
can this function be defined in BaseReactActivity ?
There was a problem hiding this comment.
I don't see why not, I was just keeping in line with the setup functions being defined in the derived classes.
There was a problem hiding this comment.
Let's move it to the base class then I'll merge. Looks great! Thanks a lot.
There was a problem hiding this comment.
No problem at all, it was a blast to work with! I'll get on that update later today.
| super.onBackPressed(); | ||
| } | ||
|
|
||
| protected void setupDrawer(Screen screen, Drawer drawer, int drawerFrameId, int drawerLayoutId) { |
There was a problem hiding this comment.
setupDrawer is taking in the layout IDs here since I'm not sure there's a way to get those from the base activity. I wasn't able to when initially refactoring.
There was a problem hiding this comment.
Nevermind me, it makes sense. They're different layouts, so they will generate different layout IDs.
There was a problem hiding this comment.
We also don't have to pass the id's as params to setupDrawer since in both layout files we use the same ids for the views. findViewById will search for these views in the layout which was passed to setContentView. No biggie, I'll merge and make that minor change later.
@jskuby Thanks a lot for your work!
This is a native drawer implementation that uses the animated arrow menu icon by default. Currently only a left menu is implemented for SingleScreenActivity and BottomTabActivity. I've been using this in a client application with SingleScreenActivity for the past few weeks and it's been working well.