android-theme

Custom attribute not resolved inside styles and theme

孤人 提交于 2019-12-04 03:19:09
问题 I have android application with custom themes which was developed 2-3 year ago. I had this stylable in my attr.xml resouce file: <declare-styleable name="EVETextViewPlus"> <attr name="customFont" format="string" /> <attr name="pageStripFont" format="string" /> </declare-styleable> And I've used this inside my style_warm.xml resource file: <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" <style name="style_display_page_title_warm">

set background Image to whole application in android

余生颓废 提交于 2019-12-04 03:15:45
问题 I want to set background image to my application in android. So my application already has a theme set in my manifest file like this <application android:theme="@android:style/Theme.NoTitleBar" /> Now this was implemented from the themes of android package. Now i want to add a background image to my entire application how can i do it. <style name="Theme.NoTitleBar.BackgroundImage"> <item name="android:background">@drawable/bitzer_background</item> </style> I want the Theme.NoTitleBar as well.

Why AppCompat does not support the current theme features windowActionBar: false

こ雲淡風輕ζ 提交于 2019-12-04 02:31:59
问题 Why AppCompat does not support the current theme features { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2473) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535) at android.app.ActivityThread.access$1100

How to override styles of a library which has its own Activity

寵の児 提交于 2019-12-04 01:57:13
I have a library which has its own Activities with colorPrimary and colorPrimaryDark attributes. In the application which is using this library, there are different values for these color attributes. Is there a way to make the library use the style provided by the caller application? So that in the end, if the app has a green toolbar, the activities in the library would have a green toolbar, not the one defined in library theme. This is the library's theme: <style name="LibraryTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/red</item> <item name=

Android Holo Light styling changes depending on chosen context

妖精的绣舞 提交于 2019-12-04 00:55:37
问题 I have been trying to find the cause of weird formatting style inconsistencies for my Views throughout my application and I think I have narrowed it down with this example. I set up two equivalent layouts of various Views s with exactly the same procedure and only varying the Context supplied in creation. In the first set, each View is created with the application's context through Activity.getApplicationContext() , whereas in the second set the View s are fed the activity's context through

Change Android Actionbar subtitle colour

丶灬走出姿态 提交于 2019-12-03 23:30:36
I wish to customize the actionBar of my android application. I am using Actionbar Sherlock. My min target sdk is 14, target sdk 17. I have a theme that changes the background colour and main title text however i cannot change the subtitle text colour my style is shown here <style name="MyTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item> </style> <style name="MyTheme.ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar"> <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item> <item

Changing the text appearance in styles and themes for an Android app

好久不见. 提交于 2019-12-03 22:17:51
I am writing an android app and I am wanting to alter the theme of my app. I have managed to alter the background colour of the app by using a theme, but I am struggling to change the default text appearance. This is my styles.xml resource file. <resources> <style name="QTheme" parent="android:Theme.Light"> <item name="android:windowBackground">@color/q_green</item> <item name="android:colorBackground">@color/q_green</item> <item name="android:textAppearance">@style/QText</item> </style> <color name="q_green">#008000</color> <color name="white">#FFFFFF</color> <style name="QText" parent="

Android theme style for button not applying

孤者浪人 提交于 2019-12-03 17:03:23
问题 I have three simple buttons in my main activity view. What I am trying to do is apply a buttonstyle to all my buttons but I fail to do so. Here's my xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/minecraft_portrait" android:alpha="0.75" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="

Android Action Bar: Changing the color of Action Buttons

最后都变了- 提交于 2019-12-03 16:21:24
I have an app with an action bar that looks like this: I would like the text of the menu action buttons "Home" and "Logout" to be white as well. How can I change their text color? Let me know if you want to see any code. Thanks! As i perceive it this is a simple attribute called android:actionMenuTextColor . To use it properly you should create your own styles, like this: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="myTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionMenuTextColor">@color/actionBarText</item> </style> <style name="myTheme.ActionBar"

Inherit editText from Theme.Light with Holo parent theme

元气小坏坏 提交于 2019-12-03 15:54:32
I want to inherit the editText from android:Theme while my parent theme is android:Theme.Holo.Light . Is there any "clean" way to do this short of copying the resources from the android sdk folder into my project? So my idea would be to have a custom theme (really just a style) that extends from android:Theme.Holo.Light , and then overwrites the EditText attributes to use the parent settings from android:Theme . It looks like android:Theme.Holo.Light uses an editTextStyle attribute reference to change the appearance of the EditTexts : <item name="editTextStyle">@android:style/Widget.Holo.Light