Android Studio, gmaps and transparent top statusbar (MD) - android

I try make google maps with listview app in material design. But part controls from google maps are under statusbar. I try add to layout top margin/padding, but then status bar is grey.
That same problem is with ListView, part first select from list is under statusbar.
How resove this problem?

Have you tried to set primarycolor and color accent in your main style theme?

Add this tag to your view
android:fitsSystemWindows="true"

Related

How to change navigation bar button color?

The primary color of my application is white and hence my navigation bar color is also white. My problem is that navigation bar buttons are also white in color. How do I make sure that buttons are visible in white background. The app theme I have used is Theme.AppCompat.Light.DarkActionBar.
I have tried using different theme but none seem to be working so far.
Can anyone tell me how I could resolve this issue?
For Android Oreo and above you can try this:
View.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
For this to take effect, the window must request FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS but not FLAG_TRANSLUCENT_NAVIGATION.
You can also refer here for more details: https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
Also there is another approach:
you can achieve it by placing this in your theme:
<item name="android:windowLightNavigationBar">true</item>

No ActionBar and no StatusBar in android studio 3.3

In the below image you can see that there is no ActionBar and StatusBar in the preview of any XML layout file, if anyone is facing the same issue and has solution please post it.
I faced the same issue, and got this:
No ActionBar visible
Change a setting for Show Layout Decorations (By Default it is unchecked, just check it and ActionBar will be there)
Visible ActionBar
Select the theme from above which have action bar by clicking where AppTheme is written in top pane of preview window.

Android ActionBar on Lollipop not styling correctly

I am designing an app with Material Design, but I am having trouble styling the ActionBar.
First of all, I can not get the ActionBar to render a shadow. I have tried setting the elevation in multiple ways:
In the styles.xml (v21):
<item name="android:elevation">4dp</item>
<item name="elevation">4dp</item>
In the onCreate() method
getActionBar().setElevation(4);
However, none of these result in the ActionBar rendering a shadow. Not sure if this is important, but I am running Android 5.0.1 Lollipop. What am I missing in trying to render a shadow? I don't really want to make a drawable shadow and set it as the window background.
Secondly, my ActionBar buttons are square, and when I click on them, the ripple is cut off in a square, while in other apps I have used the mask for the ripples has been circular, and my app had been using round buttons, but recently it changed and I don't know why. Could I have accidentaly changed something making them square?
Thank you
The issue is that u use ActionBar while the other apps use ToolBar. Read about and change your code, everything should work after that.

how to show divider between icon and title in actionbar

I'm using ActionBar. I want to add splitter between icon and title: For example like here:
Nothing from these answers helped me:
Android actionbar sherlok doesn't show divider
ActionBar Divider Styling
ActionBar MenuItem Divider
I've tried to apply style to ActionBar but Eclipse shows this:
android:showDividers requires API level 11 (current min is 9)
What should I do?
the easiest way is to add divider logo. If later you want it is not displayed click, just make its selector and put a logo without the divider for statepressed but with the same dimensions.

Custom titlebar without the shadow

I want to have a GUI kindof like how Market is. Mainly I want a title with an icon and the name. So I've disabled the default titlebar and are using a 9 patch image as my custom titlebar. It looks great, but the top system bar ( cannot remember what's it called atm ) is casting a shadow on my application - specifically on my titlebar. I've looked at the Market's custom titlebar and it doesn't have a shadow, or the shadow is below the three main buttons casting on the contentlist.
How can I remove the shadow from my custom titlebar, and maybe have it below - casting on the content?
The short answer to this is that the title bar is a part of the theme and that one have to make changes to the current theme and set a custom layout for the title bar. More info here: http://www.anddev.org/my_own_titlebar_backbutton_like_on_the_iphone-t4591.html

Categories

Resources