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.
Related
I'm having the hardest time changing the color beneath the transparent status bar color. The transparency is fine when the drawer is open, but the color beneath is wrong. Different fragments are going to have different action bar colors.
fitsSystemWindow has no effect.
Changing the status bar color just makes it solid.
If I set a color with a lower alpha, it just mixes with the green (Primary Color Dark).
What is happening: (Color underneath is green)
What I want is exactly like what is happening in the play store:
The following should do what you want:
First make sure that your app theme in v21/style.xml has
<item name="android:windowTranslucentStatus">true</item>
Use mDrawerLayout.setStatusBarBackgroundColor() for changing the background color of statusBar on fragment change instead of setStatusBarColor().
Make sure your coordinatorLayout doesn't contain the property android:fitsSystemWindows.
I want to use an Theme.AppCompat theme that uses dark nav bar icons as defaults, are there any Themes that do this? I can only see AppCompat.Light themes when I use the dot operator.
AppCompat.Light is right because it means the color of the AppBar. If it's a light color, use light and the Icons and Texts will be black. If it's a dark color, use AppCompat and the Icons and Texts will be white.
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?
I'm stuck at a very ridiculous thing.
I want to remove the divider below the action bar shown in the picture.
how can I do it?
P.S: I want to use my app for API level 8 too
There's a great tool you can use for generating an ActionBarSherlock compatible Theme. Go to the following link and initialize it with the following settings:
Style compatibility: Sherlock
Base theme: Dark
ActionBar style: Solid
This will remove the line below the ActionBar and allow you to choose a solid color for the ActionBar itself. If you simply wanted to change the color of that line, you can set the ActionBar style to Transparent and change the Accent color (this is the color chosen for that line)
http://jgilfelt.github.com/android-actionbarstylegenerator/
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