android-theme

How to change color / appearance of EditText select handle / anchor?

南笙酒味 提交于 2019-11-27 01:36:17
So I changed the style of the Holo Theme with the Holo Colors Generator and Action Bar Style Generator to my own color. But when I select text inside an edit text, the "markers" at the selected positions are still blue. How can I change it? The worst part here was to find the "name" for this item and how it is called inside the theme. So I looked through every drawable in the android SDK folder and finally found the drawables named "text_select_handle_middle", "text_select_handle_left" and "text_select_handle_right". So the solution is simple: Add these drawables with customized design/color

How to change default text color using custom theme?

*爱你&永不变心* 提交于 2019-11-27 01:32:32
问题 What I'm trying should be quite easy with themes, but I can't find out how to: I want all text to be white by default in my app. I created a custom theme in theme.xml: <style name="Theme" parent="@android:Theme"> </style> <style name="TextAppearance.Theme" parent="@android:TextAppearance.Theme"> <item name="android:textColor">#ffffffff</item> </style> and set it for the whole application: <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Theme">

Setting Android Theme background color

為{幸葍}努か 提交于 2019-11-27 01:25:55
问题 I'm trying to modify the default background theme color, which should be easy but surprisingly I can't get it working. Please note that I want the change to be across the entire app, not just for a single activity. Here is my code: styles.xml <resources> <color name="white_opaque">#FFFFFFFF</color> <color name="pitch_black">#FF000000</color> <style name="AppTheme" parent="android:Theme.Light"> <item name="android:background">@color/white_opaque</item> <item name="android:windowBackground">

Android: Theme.Holo.Light.NoActionBar vs Theme.Light.NoTitleBar

…衆ロ難τιáo~ 提交于 2019-11-27 00:58:52
问题 In res/values-v11/styles.xml , I can't use Theme.Holo.Light.NoActionBar because it was added in API level 13. Can I use Theme.Light.NoTitleBar instead, with no visual differences? As far as I can tell, they should both have a white background, status and navigation bars, and nothing else. 回答1: Theme.Light.NoTitleBar is slightly different. The easiest way to resolve this and stay compatible back to Honeycomb is to create your own style that extends Theme.Holo.Light, but removes the Action Bar.

Change Popup menu background color

僤鯓⒐⒋嵵緔 提交于 2019-11-26 23:00:49
问题 NOTE: I have searched for an hour and tried all solutions already provided by stackoverflow. I am studying theme overlays. I have made a sample app, which opens a popup menu on clicking an action bar icon. Here is my styles.xml <resources> <!-- 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

android:theme=“@android:style/Theme.NoTitleBar.Fullscreen” works on Application level but not at the activity level. Any clue?

匆匆过客 提交于 2019-11-26 22:55:07
问题 I need to make one of my activities called MyNoStatusBarActivity.java a full-screen activity. I have added in the Manifest : <activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:name=".MyNoStatusBarActivity" android:noHistory="true" android:label="@string/app_name" android:configChanges="touchscreen|keyboard|keyboardHidden|navigation|orientation"> ... </activity> And in the onCreate of my activity : @Override public void onCreate(Bundle savedInstanceState) { super

AlertDialog styling - how to change style (color) of title, message, etc

ⅰ亾dé卋堺 提交于 2019-11-26 22:35:48
问题 I've breaking my head over this quite a bit. What I need to do is, change the style of all AlertDialog s in my android application - dialog background needs to be white-ish, and text needs to be black-ish. I tried creating a lot of styles, themes, and applying from the code, manifest, etc, but no success, with regard to the text colors inside the AlertDialog . Right now, I have the simplest of codes, set like this: Manifest: <application android:icon="@drawable/ic_launcher" android:label="

How to use device default theme for app?

五迷三道 提交于 2019-11-26 21:55:42
I have an app that I want to develop for Android 2.1, 2.2, 2.3.3, 3.0/3.1 and 4.0.x. Between those API levels, there are about 3 different types of Themes. The latest 4.0.x theme is Holo. Anyways, I want my app to use the default Android theme for whatever device it's on. If it's on a 4.0.x device, I want it to use Holo. If it's on 2.3.3 I want it to use the theme from that version of Android. etc... Is there a simple way to approach this? I noticed that with 4.0, they added a Theme.DeviceDefault theme that you can use, but this doesn't help me for older API levels. What is the best approach

Styling ActionBar dropdown menu

自作多情 提交于 2019-11-26 19:15:39
问题 I'm using a custom theme that inherits from DarkActionBar and I want to customize dropdown menu to be white like when using Light Holo theme. I've been able to change the background to white using: <style name="MyTheme" parent="@style/Theme.Light.DarkActionBar"> <item name="android:actionDropDownStyle">@style/MyDropDownNav</item> </style> <style name="MyDropDownNav"> <item name="android:background">@drawable/spinner_background_white</item> <item name="android:popupBackground">@drawable/menu

Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1

爱⌒轻易说出口 提交于 2019-11-26 17:32:43
In Android I got following Error in emulator and some mobile device but not in Tablet : I can't understand what is the error actually? I have searched many tutorials but can't find any solution. Please Help me to solve this. Note: In this application i have used ActionbarSherlock and theme, may i got because of that library or any other problem? My Error Log is: 09-11 17:52:57.342: E/AndroidRuntime(9935): FATAL EXCEPTION: main 09-11 17:52:57.342: E/AndroidRuntime(9935): android.view.InflateException: Binary XML file line #2: Error inflating class <unknown> 09-11 17:52:57.342: E/AndroidRuntime