I've a view with a FAB and a navigation drawer opens up on the right side when the FAB is clicked.
I want the FAB to move to left side of the screen when the drawer opens and when the drawer closes the FAB should move back to its original position.
How can I implement this with a translation effect for the fAB? I need help.
Related
I have a root DrawerLayout in the android layout swipe left to right on anywhere on the screen.
The problem here the layout includes a board that requires moving a piece from left to right by sliding, so when a user tries to move the piece, the DrawerLayout opens up. the board only covers only half of the screen, so I still want to allow the drawer to open when the user swipes on the other views,
Is it possible to not trigger the drawer when the user swipe on a particular view?
I am using ViewPager inside my Navigation Drawer and am encountering an issue when I want to swipe to next tab in ViewPager. Swiping works in direction which opens Navigation Drawer but doesn't work in direction which closes Navigation drawer.
That means I can normally swipe to ViewPager pages to "right" direction but when I want to swipe to the "left", NavigationDrawer intercepts touch events and closes itself.
I would still like to have ability for navigation drawer to close if user swipes on content which doesn't have horizontal scroll. How can I accomplish something like this? Thank you.
use View.requestDisallowInterceptTouchEvent(true); when you do not want your ViewPager to close, call this View.requestDisallowInterceptTouchEvent(false); immediately after Action_Up.
What it does is it prevents the parent from listening or intercepting the touch event.
I want to have a drawer which is always open with a list of options(drawer list). The content has a view pager with fragments.
When I swipe from right to left or left to right on the content frame it should swipe the view pager fragments according to the swipe direction with the drawer open or close state as it is.
When i swipe the drawer from right to left it should dismiss.
So basically I want the view pager swipe enabled even when the drawer is open.
Is this possible and how can it be achieved.
I have a list view in my navigation and while I am scrolling down or up my list view I accidentally close drawer too. I don't want my users to face that issue. How can I make drawer only closable from border like it opens only from border?
Is it possible to position a SlidingDrawer so that the handle is just below the bottom of the screen?
The functionality that I'm going for is that a user will press a button (not attached to the drawer) to slide the drawer up from below the screen. From there the user is able to use the handle to slide it back down.
Use View#setVisibility(View.GONE) and View#setVisibility(View.VISIBLE) on the handle.