Navigation Drawer right gap - java

in the dev guidelines they say the gap to the right displayborder shall be 56dp if the nav drawer is opened. How can I do that? Because in the xml "match_parent - 56dp" doesnt work. :D
Guidelines
Thx for help!

I think it's 56dp by default for most Drawer widgets like android.support.v4.widget.DrawerLayout
The equivalent for "match_parent - 56dp" would be layout_width="match_parent" and layout_marginRight="56dp" for your xml view or layout inside your bigger layout.

Related

How to make a Bottom Navigation bar with ImageView instead of Menu Items?

How can I make a working bottom navigation bar with ImageViews in a LinearLayout(Horizontal) With fragments ? instead of menu items.
if already exist then please share the source code. Please help quickly :)
Or the Question could be this :
https://github.com/qhutch/BottomSheetLayout/issues/12#issue-576279364
Oh, I found my solution not exactly but this is what I want...
I add that Bottom Navigation View in a LinearLayout(horizontal) and I delete all default Styles from BottomNavigationView. So now this is not looking like a card view. After this, I add an ImageView in the LinearLayout with a weight of a ratio of 1:3 (for 4 icons ). Now I can use effects and designs on my LinearLayout. And it is looking like how I wish. 😌
[Note: For horizontally rotated screen LinearLayout, ImageView, BottomNavigationView 's width:match-parent]

How to change toolbar direction in API 16?

I have problem with changing ActionBar(Toolbar) direction from LTR to RTL in Navigation Drawer Activity.
Also tested different codes but even when whole of program direction changed, the toolbar did not change.
Can you help me?

How to create a horizontal drawer?

How do I create a horizontal drawer in Android? I have a button which is supposed to show a navbar which slides from the top like a drawer. How do I achieve this? I am new to Android guys, please help.

how to make this custom android tab layout?

I want to achieve this tab layout but i can't. I have already searched github but didn't find any help.
This is screenshot of the tabs
You can use Tablayout from support library. It has support for customViews. Checkout this link for reference https://www.androidhive.info/2015/09/android-material-design-working-with-tabs/
Use a ViewPager with a PagerTabStrip.
Have a vertical linear layout for the root layout.
Inside have a horizontal linear layout for the tabs, and another layout beneath it for each of the tab pages. When a tab is clicked, set the tab page's visibility to visible and all other tab pages to visibility gone

Apply navigation drawer show/hide mecanism to sidebar layout

I have a layout at the right side of the screen that I would like to hide and show by dragging in a navigation drawer fashion but I don't want it to be a navigation layout, just the usual layout. Can this be done? How exactly?
Yes this can be done. One way would be to implement gestures. (http://developer.android.com/training/gestures/detector.html) Probably overriding and using onScroll would work best. Basically when that method is called you can then either animate the navigation view into the current view port, or adjust the view location as you drag left/right.

Categories