Commit Graph

7 Commits

Author SHA1 Message Date
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Alexander-- 850f51a156 When drawer opens, always place focus at it's start 2020-04-12 09:39:32 +06:59
Alexander-- 53b3bda909 Comply with Checkstyle rules 2020-04-11 09:02:22 +06:59
Alexander-- c42f5eca87 Merge remote-tracking branch 'newpipe/dev' into rebase 2020-04-11 08:24:05 +06:59
Alexander-- 381b491845 Prevent foocus from escaping open navigation drawer
When contents of NewPipe navigation drawer change, NavigationMenuView
(which is actually a RecyclerView) removes and re-adds all its adapter
children, which leads to temporary loss of focus on currently focused drawer
child. This situation was not anticipated by developers of original
support library DrawerLayout: while NavigationMenuView itself is able
to keep focus from escaping via onRequestFocusInDescendants(),
the implementation of that method in DrawerLayout does not pass focus
to previously focused View. In fact it does not pass focus correctly at all
because the AOSP implementation of that method does not call addFocusables()
and simply focuses the first available VISIBLE View, without regard
to state of drawers.
2020-03-15 09:37:29 +06:59
Alexander eb6d26b6a4 Focus drawer when it opens
It is still buggy because of NavigationView (why the hell
is NavigationMenuView marked as focusable?) but at least initial
opening works as intended
2019-12-01 12:41:10 +06:59
Alexander 7db1ba40eb Do not allow focus to escape from open DrawerLayout
Upstream DrawerLayout does override addFocusables, but
incorrectly checks for isDrawerOpen instread of isDrawerVisible
2019-12-01 12:41:10 +06:59