Android | Navigation Drawer Fragment on top StatusBar - android

I used fragment to act as the listview in navigation drawer (as instructed by android developers guide). It's work fine to me, but now I have to put the status bar under the drawer layout - not otherwise with transparent status bar.
I have searched around and only found 1 potential solution provided in here. But it's not working. I would like to comment for more info but I dont have commentator privilege yet, so I start a new question.

In theme of your App in style.xml
add <item name="android:statusBarColor">#android:color/transparent</item>

Related

Not seeing action bar for every activity that isn't MainActivity

I am building an app that starts activities through intents. The design of my activities in XML shows an action bar but whenever I am debugging on a physical android device, every activity besides MainActivity loses the action bar.
The entire app bar disappears and the layout continues as if there isn't supposed to be one. What are some of the first places to look to fix this?
How it looks in Android Studio preview
How it looks on a physical device
check your theme you apply on activity or application.
if it has below code then it will not show you default action bar.
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
try to remove this line to get default action bar or add action bar using <android.support.v7.widget.Toolbar
I might recommend using the Toolbar instead of ActionBar to ensure you are always getting a Toolbar on the desired activity. The Android Developer Docs do a great job at explaining how to add the Toolbar to any activity.
https://developer.android.com/training/appbar/index.html

Borde gap between status bar and AppBar [duplicate]

This question already has answers here:
Android Status Bar transparent with Navigation Drawer - Appbar elevation
(3 answers)
How to get the new NavigationView to play nice with status bar scrim?
(5 answers)
Closed 6 years ago.
I have an issue with a simple Android project I'm styling.
The issue is exactly like the one you can sse by creating and building a default project from Android Studio Navigation Drawer Activity: this template has the navigation drawer that covers also the status bar (like GMail, for example): but as you can see there is something like a gap between the appbar and the status bar.
I really don't like it and I would like to remove it somehow, but the only way I found at the moment (without create a detailed theme from scratch, which would be inconvenient for this simple project) is to put to edit values-v21/styles.xml from
<item name="android:statusBarColor">#android:color/transparent</item>
to
<item name="android:statusBarColor">#color/colorPrimaryDark</item>
but unfortunately that also prevents the navigation drawer to be shown full height!
I'm a little upset because I think that there is a very simple solution but I'm still not able to found it!

Android Lollipop navigation bar overlays activity view

the navigation bar is overlaying my activity view on the bottom. Same issue like here: Android Navigation Bar overlaying my view
The issue seems to happen only on Android Lollipop. On my Moto G with KitKat 4.4.4. i don't have this issue. I don't know why this problem is only related to Lollipop.
My problem is, with the solution #ps-glass postet is not working for me somehow setting fitsSystemWindow = true. I tried it with the theme or with the layout file directly, nothing worked for me so far.
Here is an image: https://drive.google.com/file/d/0B5g_MttTC7ZIQzNfS3Y2dVFKSFk/view?usp=sharing
You can only see a bit of the text, the rest is overlaid by the navigation bar.
I found out that this problem is related to a library we are using:
https://github.com/jfeinstein10/SlidingMenu
and other people have this problem too after they updated their AppCompat to v21.
Some solutions were posted here https://github.com/jfeinstein10/SlidingMenu/issues/680 and another one here The getDecorView method return view include navigation bar view on lollipop?
The Solution from https://stackoverflow.com/users/715451/saulobrito is working for me now and it is the easiest way i think.
<style name="Theme" parent="FrameworkRoot.Theme">
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
</style>
I put this code snippet to a my theme in the res/values-v21 folder.

Android : Actionbar Icon disappearing in UI

I have put two icons from Android Icon Packager for action bar. The Info Action appears brightly while the next one, Refresh Action is not appearing. I use both as holo_dark. I tried switching just the refresh action, and it appears very very dimly.
I've try reading many many stuffs I seem to find nothing about this topic.
EDIT: I have solved this problem by deleting the whole refresh icon and then remove the line
android:icon="#drawable/ic_action_refresh"
in the XML. I then re-added the icon and it works like a charm. Voted both answer for caring about my question
Use Icon from your Android Package Opposite to Your Theme.
For eg: If you are using Holo_Dark Theme in your Application use Holo_White Icon Set for it.

Is it possible to display an action bar back button instead of the up button?

I have a UI sub flow in my application, and I would like to provide forward and back navigation controls on the action bar. Note I said back navigation, not 'up'.
I am aware of the up navigation button feature in Android. In this section of my UI I would like to replace the up button with a back button (and it's icon).
My question is, how do I override the UI of the up button to display a back button instead?
Note I am talking about the UI here. The navigation behavior is easy to achieve.
Have you heard about ActionBarSherlock (ABS)? Reason why I ask is, that ABS is quite close to the native implementation and once you have downloaded that source code you can find out a lot of interesting things. Searching for the home button (in the drawable folders) shows that the icon is named abs__ic_ab_back_holo_light.png.
Searching for that name leads to <homeAsUpIndicator>#drawable/abs__ic_ab_back_holo_light<homeAsUpIndicator> in the Theme.Sherlock.Light. So what does it mean? For ABS you could derive a new theme and overlay the homeAsUpIndicator tag using your own drawable. And how about the native Android scheme? Most likely just the same tag to overwrite. If you don't use ABS derive from a standard theme.
Example: here I have redefined the up indicator (with ABS)
<style name="MyAppStyle" parent="#style/Theme.Sherlock.Light">
<item name="homeAsUpIndicator">#drawable/new_indicator</item>
<item name="android:homeAsUpIndicator">#drawable/new_indicator</item>
Hope that helps! Cheers ....

Categories

Resources