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
Related
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
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!
Can Android status bar be transparent like in iOS? I want it to blend into activity like on iOS. Can it be done and if yes - how?
EDIT: Just to clarify I need to make status bar transparent, not action bar, and yes I know I can completely hide it - but that's not what I'm asking.
No you can't make the system status bar transparent, and shouldn't try to do so in an attempt to mimic iOS:
Don't mimic UI elements from other platforms
Android 4.4 KitKit now allows translucent status and navigation bars:
http://developer.android.com/about/versions/android-4.4.html#UI
For example, you can set the theme as Theme.Holo.NoActionBar.TranslucentDecor.
You can make your activity fullscreen so you won't see the status bar.
Like this :
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
Or set a theme like this
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
It can be done.
Take a look at the following library which basically implements a fading action bar, starting from fully transparent.
https://github.com/ManuelPeinado/FadingActionBar
I'm now customizing theme through some framework files. The problem is that I've made the status bar with transparent background. But there's an obvious side line between status bar and the application. How can I merge them together? Looks like the application align to the top of the screen but the status bar also exist.
Thanks in advance.
Please find WindowManager.LayoutParams.TYPE_STATUS_BAR in StatusBarService.java and replace it with WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY.
I think it is what you want.
how to set android default title bar at Bottom with image on it ?
I don't think it's possible, because I never saw something like this. But I would suggest to hide the default title bar and the make your own title bar which can be displayed at the bottom. That shouldn't be too difficult.