I wish to replace red color to the default color of ActionBarSherlock, i search but don't know what to insert it the style.xml, below is my code:
<style name="Theme.Red" parent="Theme.Sherlock.Light">
<!-- what should i insert here? -->
</style>
What should i need to do if i want to change the color of the green highlight area? The whole bar, not the title only.
So, you want a red action bar?
<style name="Theme.Red" parent="Theme.Sherlock">
<item name="android:actionBarStyle">#style/RedActionBar</item>
<item name="actionBarStyle">#style/RedActionBar</item>
</style>
<style name="RedActionBar" parent="Widget.Sherlock.ActionBar">
<item name="android:background">#f00</item>
</style>
Related
I would like to change the style (text and/or background colours) of the overflow area of the contextual action bar.
At present the text colour is taken from android:textColor in the current theme, but I want to use a different colour for the overflow dropdown.
I can change the background colour of the CAB using android:actionModeBackground, but not the overflow area.
My style currently looks like this:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:textColor">#3e3e3e</item>
</style>
Any ideas?
Thank you
Use following item
<item name="actionOverflowMenuStyle">#style/LStyled.PopupMenu.OverflowMenu</item>
And define the style LStyled.PopupMenu.OverflowMenu
<style name="LStyled.PopupMenu.OverflowMenu" parent="#style/Widget.AppCompat.PopupMenu.Overflow">
<item name="android:popupBackground">#drawable/bground</item>
</style>
I'm modifying downloads (for 4.3 Jellybean) and I can't change the colour of the text on the bottom button from black to white. Is it possible to change the text colour without giving the button its own style by adding an item in the app theme? Here is my Styles.xml:
<style name="DownloadListTheme" parent="#android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
<item name="android:textAlignment">viewStart</item>
<item name="android:layoutDirection">locale</item>
<item name="android:actionBarStyle">#android:style/Widget.DeviceDefault.Light.ActionBar.Solid.Inverse</item>
<item name="com.sonyericsson.uxp:extendedLookAndFeel">true</item>
<item name="android:textColor">#android:color/white</item>
</style>
Yes, you can accomplish this pretty easily, just override your theme in styles.xml like this:
<style name="MyButtonStyle"
parent="#android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
<item name="android:textColor">#android:color/white</item>
</style>
For more information, see the documentation.
I'm trying to tweak my app with some custom colors but I cannot change the text color of the action bar.
This is how it is currently showing:
If you look close you might see letters in the white tab bar. I'm trying to change this color to black without changing anything else of the action bar.
This is how my styles.xml looks like:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">#style/ActionBar</item>
</style>
<style name="ActionBar" parent="#android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">#color/default_green</item>
<item name="android:backgroundStacked">#color/stacked_white</item>
<item name="android:backgroundSplit">#color/sa_green</item>
</style>
Any help is appreciated.
You can make your custom theme here:
http://jgilfelt.github.io/android-actionbarstylegenerator/
Which includes all tabs and other component.
Try this ...
This should be in the theme
<item name="actionBarTabTextStyle">#style/tabtextcolor</item>
<item name="android:actionBarTabTextStyle">#style/tabtextcolor</item>
This should be where you define the tab text color.
<style name="tabtextcolor" parent="#style/Widget.Sherlock.ActionBar.TabText">
<item name="android:textColor">#android:color/white</item>
</style>
I styled my actionbar like so, which results in a normal spinner and not an action bar spinner (without the line on the bottom). But I do want it to be white and prefer to not user my own drawables for this and use the android's spinner style. (See below what the result is).
<style name="AppTheme" parent="#style/Theme.AppCompat.Light">
<item name="android:actionOverflowButtonStyle">#style/AppTheme.OverFlow</item>
<item name="android:actionDropDownStyle">#style/AppTheme.actionBarDropDown</item>
<item name="android:spinnerDropDownItemStyle">#style/DropDownList</item>
<item name="android:actionBarSize">48dp</item>
<item name="actionBarSize">48dp</item>
</style>
<style name="AppTheme.actionBarDropDown" parent="android:style/Widget.Holo.Spinner">
<!--<item name="android:background">#android:style/ab</item>-->
</style>
<style name="DropDownList" parent="#android:style/Widget.Holo.Light.ListView.DropDown">
<!-- background of the list menu -->
<item name="background">#android:color/background_light</item>
<item name="android:background">#android:color/background_light</item>
<item name="android:popupBackground">#android:color/background_light</item>
<!-- dividers -->
<item name="android:divider">#color/border_color</item>
<item name="android:dividerHeight">1dip</item>
<!-- item selected -->
<!--<item name="android:dropDownSelector">#android:color/holo_blue_dark</item>-->
<!--<item name="android:listSelector">#android:color/holo_blue_dark</item>-->
</style>
as you see the line breaks my design of the title.
Does anyone know what I could change to use a normal actionbar spinner drawable?
I can't seem to find this anywhere on stack.
Check the comments of the question, it's based on resources which don't have a white arrow, it's grey and it's not for the actionbar. So the best option is to use the generator
I would like to change the color of the line that appears onto the contextual action bar; to be more clear I will put an image:
You see the Light blue line just above the white area? How could I change its color? Thanks
You should first create your own 9-patch image with the colours which you want to use. For example an image like this :
And after that in your application's theme you should add this (for Holo Theme) :
<style name="Theme.MyAppTheme" parent="#android:style/Theme.Holo.Light">
<item name="android:actionModeBackground">#drawable/my_actionmode_background</item>
</style>
For ActionBarSherlock or AppCompat you should use :
<!-- AppCompat -->
<style name="Theme.MyAppTheme" parent="#style/Theme.AppCompat.Light">
<item name="actionModeBackground">#drawable/my_actionmode_background</item>
</style>
<!-- ActionBarSherlock -->
<style name="Theme.MyAppTheme" parent="#style/Theme.Sherlock.Light">
<item name="actionModeBackground">#drawable/my_actionmode_background</item>
</style>