On Lollipop, in the Gmail app, the nav drawer opens up behind the top status bar. My nav drawer layout is match_parent, but it stops below the status bar. Any idea how to accomplish this?
FYI I am using the new Toolbar...
Got this image off the internet, don't mind the image on the right..
Please see this answer:
https://stackoverflow.com/a/26440880/961759
Here's a nice open source example on how to accomplish the desired behaviour
https://github.com/kanytu/android-material-drawer-template
Related
I am new to Android. I want to implement navigation drawer as this :
The Navigation drawer should open below App Bar and should have red left pane for category icon and right page (white) with navigation options.
I am trying to convert default Navigation Drawer activity of Android to this style but don't know where to start with.
If anyone can help me implementing this would be great help.
Thanks in advance.
you need a custom navigation drawer to achive that, you can start by following this link https://github.com/awidiyadew/DrawerMultiLevelListview
I have created an android app with a navigation bar activity. I have added an image header to the navigation drawer activity. But, it is showing a little gap in the left.
Please help me.
Here is the link to the emulator screenshot.
https://drive.google.com/uc?export=download&id=0ByJqiordkH5zYm9mam1MTTRvU2c
Thanks.
Also, send me a good tutorial on adding icons to items in navigation drawer.
Thanks I did it. I used android:ScaleType="fitStart" to clear this.
I noticed Play Store application detail pages show a transparent status bar since version 5.4, but how is it implemented?
I tried to add WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS flag to my window, but the result is both the status bar and the navigation bar are transparent. How can I just make the status bar transparent but the navigation bar keeps normal?
I see your link and see that:
+If you want collapse toolbar like this. Try [CoordinatorLayout][2].
+If you just want transparent toolbar try: android:background="#android:color/transparnt" on toolbar.
Sorry if I misunderstood your question
So i was trying Navigation Drawer and Toolbar (Lollipop) for my first time and i've came a cross a problem that i'm struggling to find a solution.
I've managed to put it to work with Action Bar, but after i configured the new ToolBar to work with my app (and consequently taking action bar off), my navigation drawer is showing nothing but a white panel. Also, it seems that its buttons are working, because when i click a spot in the blank area, the navdrawer immediately closes.
layout_toolbar.xml
activity_homepage.xml
(Resume of) ActivityHomePage.java
The problem itself
Edit: Variables definition
Change in setAdapter(... this to getActivity().getBaseContext()
In the app I am currently working on, I am working on implementing the translucent status bar with action bar tabs. I hide the ActionBar and only show the tabs.
My problem is that now, the system lets space for the action bar that is not there so FitsSystemWindows is making an error.
How can I fix that?
Thanks
The actual solution that time was quite dirty: I needed to set a custom padding from the top (I think it was 47dp or something like that) to the ViewPager (I think it was the ViewPager).
The real solution has come with AppCompat that fixes such issues: So use AppCompat!