Navigation drawer is displaying incorrect theme - android

I've recently implemented a navigation drawer in an app that I'm working on, and I've noticed it hasn't taken on my app theme Holo.Light.DarkActionBar. Shouldn't the nav drawer have the same style as this theme, which would be that light-gray background and dark gray text? Currently it has a black background with white text. How would I go about having my navigation drawer's theme consistent with the rest of the app? I don't think I can set the theme/style to the layout of the drawer nor can I do it programatically. Is this something I must do manually? If so, does anyone know the hex values for the dark gray text and light-gray background, as I can't seem to access the default resource that contains these values.

You have to theme the navigation drawer manually, it doesn't inherit the parent theme. Here's a question that contains a list of all the Holo colors: What are the default color values for the Holo theme on Android 4.0?

Related

how to customize app title in collapsed (for example: center or right align)

I can customize my Actionbar. But I can't customize it when the app is collapsed.
How to customize the app title when the app is collapsed (for example: center or right align)?
The color of the app bar in multitasking mode I believe is defined by the android:colorPrimary (or colorPrimary if you're using AppCompat) attribute in your styles.
I don't think you can change the alignment of the text of the app bar though.

transparent statusbar navigationdrawer after setstatusbarcolor

I'm try to developing an app with a navigation drawer from a template found on github.
In style.xml i have:
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#ff0000</item>
<item name="colorPrimaryDark">#0000ff</item>
and the status bar in navigation drawer is ok.
When i click the button it runs this command:
getWindow().setStatusBarColor(Color.GREEN);
Now the status bar color in navigation drawer is no more translucent
How restore status bar color to translucent?
The difference is that the xml defined colors colorPrimary and colorPrimaryDark are not really used to directly set the status bar color.
Actually the statusbar is completely transparent all the time and only the underlaying View is colored. Thats why it can have another color on the left than on the right side (have a look at your second screenshot). If you now call getWindow().setStatusBarColor(..) you indeed color the statusbar directly and over-draw the color of both Views. So it needs to stay transparent!
What you really want to do, is changing the color of the View underlaying the status bar, which is done with the ScrimInsetsFrameLayout class.
Have a look at this question and this class from the library you provided
There you should find all the necessary information to change only the color of the area you want to.
In case you really just want to reset the color:
getWindow().setStatusBarColor(Color.TRANSPARENT);

Translucent theme with material

I'm trying to create transitions in my application and it looks bad since the background color of my "android:windowBackground" (white) is flashing for a few ms when I change activity.
Managed to remove it with the Translucent Theme (parent="android:Theme.Translucent.NoTitleBar"), but Translucent does not seem to be an option when using the Material theme. Is there any way to combine those themes?

Change default color theme in ActionBarDrawerToggle

I am applying a style in my Android app where the main colour is the orange. So I would like to set up a theme where the main colour is orange instead of the blue one in Holo theme. Is there a way to change globally the theme colours?
For example, I would like to change the drawable which is applied while pressing the ActionBarDrawerToggle. How could I change that drawable? And the one with the caret pressed to go to a parent activity?
I am developing an Android app for Level 10 API and using Support Library v7.
Thanks in advance.
You can use a tool such as Android Action Bar Style Generator to change the coloring of the action bar and the accent color used for touch highlighting (although note the Kitkat styling is light gray touch highlighting rather than colored highlighting).
Similarly, for the Navigation Drawer icon itself you can use the Navigation Drawer Indicator Generator to colorize the drawer itself, although generally you should consider coloring the Action Bar with your primary color and using the default holo light/dark for icons.

how to change the navigation drawer theme with backward compatibility

In my application i have to change the navigation drawer same as Action bar's which is light now How i can change the navigation drawer theme to light by default it is dark?? I search for this but didn't find anything satisfying.
change background color of your list view or change theme of your list-view raw theme

Categories

Resources