how does navigation drawer cover actionbar? - android

I want to make to cover action bar when navigation drawer appears.
but i know only to stay action bar when navigation drawer appears.(and i know that this is standard form at google)
i didn’t find stackoverflow perfectly, because I cannot speak english well.
Now i made (picture 1)form, How do i want to make to cover action bar when navigation drawer appears as (pic2) form?
pic 1 : https://imageshack.com/i/ex3qfeOIp
pic 2: https://imageshack.com/i/p88OOwyTp

Its kind of easy.First u need to add listener to your navigation drawer setDrawerListener in that u make a listener of DrawerListener class. This class has methods onDrawerClosed() and onDrawerOpened(). In these methods u can hide the action bar or choose to show the action bar appropriately using getActionBar().hide() or getActionBar().show()

Related

how to design navigation drawer & title bar?

i want to design a navigation drawer for my app . In it i want various options to go to various activity.
I also want to add some clickable items on title bar which would go to any activity specified.
so, please suggest me direction to proceed.
Best example is add new activity and select "Navigation Drawer Activity"
That use titlebar item for opening menu and swip for opening and closing menu

How to hide a certain activity's action bar while maintaining the navigation bar?

I'm developing an application with a side navigation menu.
In my activities, the action bar of the activity I'm loading overlays the action bar with the side navigation menu. Even though the side menu is there and works fine.
Home page with the side navigation:
Side navigation works when swiping:
I want to hide or remove the activity's action bar while maintaining the side navigation menu.
This is the code from the onCreate() method
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame);
getLayoutInflater().inflate(R.layout.activity_complaint, contentFrameLayout);
you can do 2 things
you can provide padding to the side navigation menu , so that the side navigation menu will be displayed just below the action bar
another thing you can do is to hide the Action bar when Navigation Drawer icon is clicked
the code to hide Action bar is below
android.support.v7.app.ActionBar AB= getSupportActionBar();
AB.hide();
I found a solution using the answer from this question:
How to Display Navigation Drawer in all activities?
and adding this bit of code to my activity in the Manifest.xml file
android:theme="#style/AppTheme.NoActionBar"

Fly-out menu hovering above action bar, but not hiding it

I have created a fly-out (sliding) menu by an example.
In example author uses NoActionBar attribute for activity to hide action bar.
But in my app I want to use actionBar's tabs (tabbed control, tab navigation) for navigation (like in a third picture).
Also in first and second pictures we can see a fly-out menu with desired view (screens from vk android app). Theirs menu hovers above action bar and they use tab control!
Last picture is my app. There menu is under action bar.
So, my question is: How can I make fly-out menu that will hover above action bar? But not with hiding action bar, so I will have possibility to use actionBar's tabs (it is impossible with NoActionBar attribute).
]
UPD: Found nice example here https://github.com/Cheesebaron/SlidingMenuSharp
I recommend you looking into this example, it has all the needed information: https://github.com/chrisbanes/cheesesquare
Your problem is that you inflate your navbar "under" the main activity (I guess, in a fragment).

How can I slide the layout with action bar?

How can I slide the layout with action bar ?
Right now my navigation drawer list just appear below the action bar, but I want it to overlap the action bar onclick of navigation drawer icon; can I do this?
For this you can use sliding pane layout
Here is a link
https://github.com/cricklet/Android-PanesLibrary/tree/master/example
you can slide the layout with action bar
you have to make a sliding pane and then navigation drawer in the 2nd view
which you will get after implement this example
and here is the link for navigation drawer
http://www.codeofaninja.com/2014/02/android-navigation-drawer-example.html
combine these examples
it can help you a lot!!
Navigation drawer usually stays below action bar so you can slide it out or open it via the navigation button. Based on the image you posted, I think you should use this well-known lib: https://github.com/jfeinstein10/SlidingMenu.
It takes some steps to set up but when you're done you can customize it the way you want easily. The author also provided demo on Google Play Store and Youtube for you to review.

Customize Navigation Drawer Action Bar (App Compact) in android

I want to customize navigation drawer app compact action bar, I want to remove app icon from that and want to make its title center in action bar.
I have applied all solutions , but nothing is working with all the conditions.
Please give me some clue for applying it correctly
You should creat a customize action bar. Then, if you want you can add a button that can open and close your drawerlayout.
I have solved my problem. As mentioned, I have two problems, and I solved that in following way :
1) For making title centre, we need to make custom layout of action bar, and need to remove action bar title.
2) for remove app icon from action bar, we need to set android:icon property of that activity in manifest with transparent image or colour.

Categories

Resources