-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Menu Drawer will grab focus when Not currently Shown #207
Comments
Hi @kingargyle , Can you please explain the above via a code sample ? Even i m also facing the same issue and having problems resolving them . |
Basicly when you close the drawer you need to make all the views in the drawer invisible. Then when the drawer opens, make the views visible and set the focus to one of the newly visible views. |
I tried with the following code sample ...
But i m still facing the same issue. Although , if i enable hardwareAccelerated as true for the activity, then it works fine. |
I also specifically call requestFocus when opening and closing the drawers to help give the system some info on which item should have focus when opening and closing the drawers. |
Currently I'm using Menu Drawer with the serenity-for-android project. One thing I've noticed is that items in the menu drawer will gain focus periodically when using a D-Pad for navigation and the menu drawer is currently not displayed.
In order to work around this, I've had to make sure items in the drawer are not visibile views when the drawer is off screen. However this makes for some messy coding when trying to get the drawer working the same between a Touch screen interface and one where only a D-Pad is available. It would be nice to have the Menu Drawer only respond to Focus events if the Drawer and it's items are visible on the screen, otherwise none of the drawer items should respond to request for focus.
The text was updated successfully, but these errors were encountered: