android-styles

Set color of ShareActionProvider

邮差的信 提交于 2019-12-23 20:24:08
问题 I defined a color for my whole app (a dark grey) and so when I click on the ShareActionProvider, a black list shows up but the text color is dark grey too (and so not really visible). The text in the ActionBar is white, but not the one in the list. Is there any way I can set a different color (some item in styles.xml ?) Thanks 回答1: Best way to customize shareActionProvider is create separate menu specifically for Sharing. See this link https://stackoverflow.com/a/22192759/1237175 来源: https:/

Failed to find style 'listMenuViewStyle' in Android Studio

旧城冷巷雨未停 提交于 2019-12-23 19:17:39
问题 I'm trying to add icons to my menu items in my android application. However the layout preview window in Android studio is displaying the error: Failed to find style 'listMenuViewStyle' in current theme I'm using the Holo.Light theme, and have tried a number of other themes with no luck. My layout xml is as follows: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context="com.me.myApp.activities.StartActivity" > <item

Color of the text is not changing when style including textColor is applied to textAppearance of textView

一笑奈何 提交于 2019-12-23 18:03:21
问题 I want to reduce my xml code repetition. So I made some standard styles for text in textView. We can apply styles under 'style' attribute as well as 'android:textAppearance' attribute in textView. Below are some styles I made for text appearance- <style name="Grey"> <item name="android:textColor"> #333333 </item> </style> <style name="CodeFont" parent="@android:style/TextAppearance.Medium"> <item name="android:textColor"> #00FF00 </item> <item name="android:typeface">monospace</item> <item

Using latest material outlined buttons with alertdialog

假如想象 提交于 2019-12-23 17:54:37
问题 I want to use new material outlined buttons with default alert dialog. I have created style in style.xml as below <style name="OutlinedButton" parent="Widget.MaterialComponents.Button.TextButton"> <item name="strokeColor">@color/colorAccent</item> <item name="strokeWidth">2dp</item> </style> <style name="MaterialDialogStyle" parent="Theme.MaterialComponents.Dialog.Alert"> <item name="android:textColorPrimary">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item> <item

How do I inherit from default Android style in my custom styles.xml?

穿精又带淫゛_ 提交于 2019-12-23 16:34:32
问题 I am currently using this custom styles layout for my EditTexts defined in 'styles.xml': <style name="Form_EditView"> <item name="android:textColor">@color/white</item> <item name="android:textSize">@dimen/large_text_size</item> <item name="colorControlNormal">@color/white</item> <item name="colorControlActivated">@color/pink</item> <item name="colorControlHighlight">@color/pink</item> </style> However now my dilemma occurs as I have a TextView that I would like to be styled like a default

Default theme is not working after enable Proguard file(minifyEnabled true)

邮差的信 提交于 2019-12-23 13:30:15
问题 It's my first time that i'm working with Proguard file. I started a new project so i can learn more about Proguard File. My problem is when i enabled the Proguard something went wrong. Hello world is misplaced from its location as in image below : App running without enable Prodguard : My styles file: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color

Android Marshmallow - Custom seekbar progress bar not showing

北城以北 提交于 2019-12-23 08:59:20
问题 I'm trying to customize my seekbar like this: On API level < 23, progress line is visible even if progress of seekbar equals to 0. But on API level = 23, I have strange issue: progress line not showing in the same conditions =/ I want to see this line, because it is clarifying borders of usage my seekbar. My seek_bar_progress_bar.xml : <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"

Android: textColor ignored in android:textAppearance of the EditText

£可爱£侵袭症+ 提交于 2019-12-23 08:46:56
问题 Is there any reason why is textColor property being ignored when it is set via custom textAppearance style? <style name="EditTextAppearance" parent="@android:style/TextAppearance.Widget.EditText"> <item name="android:fontFamily">sans-serif-medium</item> <item name="android:textSize">16sp</item> <item name="android:textColor">@color/blue</item> <!-- IGNORED --> </style> Setting style in XML: <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android

How to change the default divider color for all ListViews

两盒软妹~` 提交于 2019-12-23 08:38:48
问题 I am trying to apply default styling for all the listViews from style.xml Please note at some places I am using nested listViews. In style.xml <style name="Theme.MyTheme" parent="Theme.Sherlock.Light.ForceOverflow"> <item name="android:windowContentOverlay">@null</item> <item name="android:listViewStyle">@style/awesomeListViewStyle</item> </style> <style name="awesomeListViewStyle" parent="@android:style/Widget.ListView"> <item name="android:fadingEdge">none</item> <item name="android

Dependent preferences display wrong color font when disabled

删除回忆录丶 提交于 2019-12-23 07:16:15
问题 In my app I am using several preferences, including some of them related with dependencies using the following attribute: android:dependency="pref_key" . Basically, when the checkbox is not selected, all the other preferences below are disabled: The problem happens when I setup back the following 3 lines in my custom theme: <style name="AppThemeOrange" parent="@style/AppTheme"> <item name="android:textColorPrimary">@color/OrangeMain</item> <item name="android:textColorSecondary">@color