android-theme

Android EditText Text Color is always white

依然范特西╮ 提交于 2019-12-25 08:03:51
问题 Good day all, I have an issue that's truly maddening. For some reason the textColor attribute for the EditText component in my custom theme is not taking effect. Please note that everything else for my custom theme is working, it's just the 'textColor' part that is giving trouble. I've seen other people with the same issue, and their 'solutions' aren't working for me. [Articles referenced before posting this] TextView color is always white for AppCompatActivity Edittext color is white in

Lollipop v21, FragmentDialog doesn't take my activity theme

限于喜欢 提交于 2019-12-25 04:48:08
问题 I have my activity theme as below set. <style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorPrimary</item> <item name="android:colorButtonNormal">@color/colorPrimary</item> </style> The activity have a simple FragmentDialog that is started using (Kotlin code) MyDialogFragment().show(supportFragmentManager, MyDialogFragment.TAG) The

Android - Setting default style for EditText view is not working

安稳与你 提交于 2019-12-25 04:16:03
问题 I am trying to set default style for edit text view. In this example, I have set default style for editText as well as for textView. Here is my styles.xml from values folder: <resources> <style name="AppBaseTheme" parent="Theme.AppCompat.Light"> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <item name="android:editTextStyle">@style/AppTheme.EditText</item> <item name="android:textViewStyle">@style/AppTheme.TextView</item> </style> <style name="AppTheme

Set default theme colors for widgets?

廉价感情. 提交于 2019-12-24 16:26:58
问题 Widget colors differ between devices: the Galaxy Tab, for instance, uses a bluish/teal color for highlighted tabs and for preference sub-text, whereas the Dell Streak uses a dark gray. Is it possible to set the default theme colors used by widgets? Or where are these colors derived from? 来源: https://stackoverflow.com/questions/5875104/set-default-theme-colors-for-widgets

Modify existing theme

£可爱£侵袭症+ 提交于 2019-12-24 07:35:06
问题 I would like to know if it is possible (and how) to customize an existing theme. What I'm looking for is how can I retrieve a certain attribute (i.e. color) and change it when the Activity starts and reapply the modified theme before setContentView() . Similar to setTheme() , but instead of using a resource id, use the modified theme. 回答1: Why not just make your own theme, setting the android:parent to the theme you want to copy, then set your own attributes? That is demonstrated in this

How can I change the touch affect color of Actions with ActionBarSherlock?

拟墨画扇 提交于 2019-12-24 03:40:46
问题 I have several actions all of which display properly. When I click the actions however, the color comes up as the default blueish color and it looks awful with my app. How can I change the 'selected' color of the Action? This is basically a duplicate of this question, except that one doesn't deal with ActionBarSherlock. EDIT Using the accepted answer, I am getting this error after adjusting style.xml The error is error: Error retrieving parent for item: No resource found that matches given

RingtonePreference Theme

萝らか妹 提交于 2019-12-24 02:14:39
问题 Im creating an Android App, totaly in Holo.Light Theme. All the preferences are light, except for the Ringtonepreference! I have even tried setting the BGColor and the textColor in the Preferences.xml: <RingtonePreference android:icon="@drawable/ic_menu_note" android:key="ringtone" android:persistent="true" android:summary="@string/settings_ringtone2" android:background="#000000" android:textColor="#ffffff" android:title="@string/settings_ringtone" /> Android ignores everything.. Has anybody

setting translucent status bar from a fragment

被刻印的时光 ゝ 提交于 2019-12-23 23:00:20
问题 For Lollipop+, I am trying to set the status bar translucent from a fragment. The calling activity’s layout contains a FrameLayout, the activity uses the SupportFragmentManager to replace the original fragment with the new fragment. Inside the new fragment’s onViewCreated I am using the ContextThemeWrapper to set the new theme. The theme contains several changes and changing the status bar to translucent is one of them. The other theme changes take effect, but the status bar maintains the

PlacePicker doesn't pick up material theme

半腔热情 提交于 2019-12-23 07:47:07
问题 I am using a PlacePicker library from Google Play Services which starts up a new activity. The new activity/picker has a toolbar (actionbar) which is not styled by default. PlacePicker documentation states that If you set custom colors in your application using the material theme, the place picker inherits the colorPrimary and colorPrimaryDark attributes from the theme. I have a theme in my style.xml file: <style name="AppTheme" parent="Theme.AppCompat.Light"> <item name="colorPrimary">

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