android-theme

Styling Tab Widget's using XML

妖精的绣舞 提交于 2020-01-01 16:09:28
问题 So I am having great difficultly styling tab widgets using xml. Everywhere I have searched seem's to either suggest solutions to do this programmatically, or refers to the actionBarTab style >:| What I am trying to achieve is a customised tab from the tabwidget drawables that was generated using http://android-holo-colors.com/ I manage to get the So in my custom theme I have this code: <style name="RR.App.Theme" parent="android:Theme.Holo.Light"> ... <item name="android:tabWidgetStyle">@style

Changing default text colour and still showing disabled menu items in different colour

a 夏天 提交于 2020-01-01 12:35:19
问题 With Theme.Holo.Light as the base theme, a designer noticed that the default text colour is not black, but a dark grey ( #505050 ). We'd like to change it to black. Looking for a simple way to change the default to black everywhere in the app, I found that this works: <resources> <style name="MyAppTheme" parent="android:Theme.Holo.Light"> <item name="android:textColor">@android:color/black</item> </style> </resources> Now, problem is , that also changes the colour of disabled items in Action

Dialog themed activity : positive and negative buttons

江枫思渺然 提交于 2019-12-31 22:22:24
问题 I'm trying to theme an activity as an AlertDialog . The problem I'm facing is that I can't find a way to put two buttons on the bottom of my window that would look like the positive and negative buttons of an AlertDialog I've already added that line to my Activity in the manifest (I'm using Sherlock Library): android:theme="@style/Theme.Sherlock.Dialog" And the Activity is looking exactly like a Dialog, but I can't find a theme to set on the buttons. What could I do? 回答1: Alright, if you're

Android Preference Fragment Text Color

十年热恋 提交于 2019-12-31 09:29:06
问题 I want to change the text color in android preferences fragment. I am currently using a custom theme to change the checkbox image, background, onClick highlighting and it all works great...besides the text color. I don't want to use a default theme, I want to have my own theme so it all looks how I want to but just change the text color, can someone please help. styles.xml <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name

Android Theme.NoTitleBar doesnot work

倾然丶 夕夏残阳落幕 提交于 2019-12-31 03:24:09
问题 I am have a facebook like sliding menu bar in my app in which the two content and main layout of the app is handled by a Custom layout class. I want to remove the titlebar of my app Issue: Even though I place android:Theme.Light.NoTitleBar in my manifest there is a blank space of title bar. Due to which my whole layout is pushed downwards. I have tried using requestWindowFeature(Window.FEATURE_NO_TITLE); and getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,WindowManager

Android “You need to use a Theme.AppCompat theme (or descendant) with the design library”

三世轮回 提交于 2019-12-30 17:44:54
问题 Ok , im getting this error (title) . Many post suggested me (even Android studio) to change the theme , to App.Appcompat , i have done it . Manifest file : <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.AppCompat"> <activity android:name=".activity.MainActivity" android:label="@string/app_name" android:theme="@style

Android “You need to use a Theme.AppCompat theme (or descendant) with the design library”

你。 提交于 2019-12-30 17:44:05
问题 Ok , im getting this error (title) . Many post suggested me (even Android studio) to change the theme , to App.Appcompat , i have done it . Manifest file : <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.AppCompat"> <activity android:name=".activity.MainActivity" android:label="@string/app_name" android:theme="@style

ActionBarSherlock doesn't support light-theme alert dialogs?

主宰稳场 提交于 2019-12-30 06:59:07
问题 Well as the title says, i'm using the actionBarSherlock library and a light theme, and sometimes I need to show a dialog using the alertDialog.Builder class. Thing is, no matter what I try, the theme doesn't apply to the dialog itself. The theme should work on both new APIs and old ones (prior to honeycomb). example: code: final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme_LightDialog)); or: final AlertDialog.Builder builder = new

Repeating style in v19/v21

送分小仙女□ 提交于 2019-12-30 04:03:41
问题 I have this in my styles.xml : <style name="UserTheme" parent="ThemeBase"> <item name="android:editTextStyle">@style/EditTextTheme</item> </style> Why do I have to repeat the editTextStyle line in v19/styles.xml and v21/styles.xml . v21/styles.xml : <style name="UserTheme" parent="ThemeBase"> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> <item name="android:editTextStyle">@style/EditTextTheme</item> </style> Is there a

Dynamically find the theme name in Android application

删除回忆录丶 提交于 2019-12-29 07:53:58
问题 I have a tablet application which I am rebranding so there are multiple themes, based on the type of user. I'd like to find the name of the theme that is currently being applied, and based on that theme then I can do some back-end functionality changes. I have to dynamically set some image resources, which is fine as long as I pass in the correct theme resource (the R.style.redtheme), but I'd like to set this dynamically. TypedArray a = getTheme().obtainStyledAttributes(R.style.redtheme, new