android-styles

Change DatePicker header text color

元气小坏坏 提交于 2019-12-17 19:52:36
问题 I have a datepicker that's showing a header on Lollipop, it looks like this I want to either change the color of the big date in the header from black to white, or remove the header altogether, I don't care which. I've tried changing textColorPrimary , textColor and titleTextColor but it has no effect. 回答1: Well I have no clue what's the parent theme that you have for your Date Picker theme. Let's say you have a custom theme for your Date Picker like below, <style name="yourCustomStyle"

appcompat_v7: Error retrieving parent for item: No resource found that matches the given name

自作多情 提交于 2019-12-17 19:12:41
问题 I am trying to build the Android project that uses appcompat_v7 library. For that, I created my project through Eclipse -> New Android Sample Project and added my custom styles.xml and then added the appcompat_v7 library Project -> Properties -> Android -> Add. But I am getting the following errors in appcompat_v7/res/values/styles_base.xml when I compile my project: appcompat_v7/res/values/styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given

Android theme not being set

∥☆過路亽.° 提交于 2019-12-17 18:48:45
问题 I have a theme that refuses to be applied to activities - none of the styles are applied. If I don't supply the layout_width / layout_height attributes for <Button> it also gets a runtime error, showing that the Button class isn't being applied. /res/values/themes.xml : <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme" parent="android:style/Theme.Black"> <item name="android:windowNoTitle">true</item> <item name="android:buttonStyle">@style/Button</item> <item name=

How to style the cursor color of SearchView under AppCompat

十年热恋 提交于 2019-12-17 18:25:50
问题 My SearchView is android.support.v7.widget.SearchView and AppTheme is showed below. <style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="colorAccent">@color/color_accent</item> </style> <style name="AppTheme" parent="AppBaseTheme"> </style> The color of SearchView seems strange, its cursor and bottom line showed white and

Styles and themes on values, values-v11 and values-v14 folders

不羁的心 提交于 2019-12-17 17:54:30
问题 I am currently working on my app to base its design on the Holo theme. Globally what I want to do is working but I am a little confused about the way that are working the folders values , values-v11 and values-v14 . So I know that: values is targeting the API inferior to 11 values-v11 is targeting the API between 11 and 13 values-v14 is targeting the API superior to 13 At first I thought I had to specify for every folder all the styles needed for the app but then I realized a kind of

Cannot resolve symbol 'Theme' in styles.xml (Android Studio)

﹥>﹥吖頭↗ 提交于 2019-12-17 04:46:49
问题 Since today, Android Studio can't find the AppCompat themes in styles.xml, but for example AppCompatActivity in code does get recognized. My Android Studio version is 2.2.2, Build #AI-145.3360264 I already tried upgrading to the latest build tools, compile sdk (25) version etc. but it didn't fix the problem. At the moment I have installed the following (from sdk manager): android api: 19 and 23 sdk platform tools: 25.0.1 sdk tools: 25.2.3 build-tools: 23.0.2 and 25.0.1 support repository: 40

How to change color of the back arrow in the new material theme?

戏子无情 提交于 2019-12-17 02:39:30
问题 I've updated my SDK to API 21 and now the back/up icon is a black arrow pointing to the left. I would like it to be grey. How can I do that? In the Play Store, for example, the arrow is white. I've done this to set some styles. I have used @drawable/abc_ic_ab_back_mtrl_am_alpha for homeAsUpIndicator . That drawable is transparent (only alpha) but the arrow is displayed in black. I wonder if I can set the color like I do in the DrawerArrowStyle . Or if the only solution is to create my

Why is my Button text forced to ALL CAPS on Lollipop?

戏子无情 提交于 2019-12-17 02:28:33
问题 In my app "Tide Now WA" which I recently tested for compatibility using the new Nexus 9 tablet (Lollipop - API 21). It writes some button text. This app writes the text correctly using Android 2.3 and Android 4.0. I.e. mixed capital and lower case letters. When same app is run on my Nexus 9 all the letters in the text are capitalized. FWIW my manifest contains the following statement: uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" Can I fix this in my code or is it a bug in

How can I style an Android Switch?

☆樱花仙子☆ 提交于 2019-12-17 02:01:05
问题 The switch widget introduced in API 14 is styled by default with holo theme. I want to style it slightly different, changing its colors and shape a bit for branding reasons. How does one go about this? I know it must be possible, as ive seen the difference between default ICS and Samsung's touchwiz theme I assume I'll need some state drawables, and I've seen a few styles in http://developer.android.com/reference/android/R.styleable.html with Switch_thumb and Switch_track that look like what I

Several android attributes not resolved in styles.xml

余生颓废 提交于 2019-12-13 17:21:22
问题 Every attribute prefaced by "android:" in my styles.xml below is giving me a "cannot resolve symbol" error. It's been like this for a while so I'm not sure where it began and what causes it. Removing "android:" gives me a "resource linking failed" error in the build log. <!-- 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