android-theme

Style inheritance of extended Widget

风流意气都作罢 提交于 2019-12-06 03:17:08
问题 In my project (Target API 21 with AppCompat support), I need to extend the EditText class. My problem is MyEditText class does not inherit EditText style customized with: <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar" > <item name="colorPrimary">@color/primary</item> <item name="colorControlNormal">@color/grey_light</item> <item name="colorControlActivated">@color/primary</item> <item name="colorControlHighlight">@color/primary</item> </style> with @color/primary

Android: change width of overflow menu

◇◆丶佛笑我妖孽 提交于 2019-12-06 03:04:25
问题 Currently I have an overflow menu which has default width: What I want is: I have tried changing the theme this way: <style name="MyWorkspaceDetailTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar"> <item name="android:popupMenuStyle">@style/MyPopupMenu</item> </style> <style name="MyPopupMenu" parent="@android:style/Widget.Holo.ListPopupWindow"> <item name="android:dropDownWidth">30dp</item> </style> but didn't got any success. Please can anyone help. 回答1: I was follwing this[http

Change Theme Color at Runtime in Android [duplicate]

∥☆過路亽.° 提交于 2019-12-06 02:52:13
问题 This question already has answers here : Set theme color dynamically (5 answers) Closed last year . Theme colors can be changed if multiple themes added in app and can be switched at run time easily. Other way is to change the color of actiobar, textview etc one by one of all the object. This way is very long and take lots of code. Simple way i found is to change colors declare in colors.xml file but i could not find a way programmatically or third party library to do that. Is there a way to

SeekBar Holo Theme using Support Library

白昼怎懂夜的黑 提交于 2019-12-06 02:42:19
I am using the Android Support Library v4 and v7 to get Fragments, Swipe-able View Pagers, and even ActionBar! It works and the graphics are really nice! However while the graphics for the above look nice and consistent in Android 2.x and Android 4.x, some common widgets look very different between versions. This leads to colours mismatch inside the app with an otherwise consistent look UI - so no matter what I draw in the rest of the UI, either the yellow SeekBar or blue SeekBar won't match something. I thought the whole point of the support library is to get a consistent UI across platforms,

WebView resetting UiMode and breaking dark theme

断了今生、忘了曾经 提交于 2019-12-06 02:35:46
Our app relies on AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) to make us pick up Light and Dark theme colors from values/colors and values-night/colors But every time we try to use the WebView , it starts by resetting the UiMode and our app gets confused which color values to pick for our themes Some people discussed the issue in detail here and here Anyone out there run into a similar issue? Answering my own question, looks like Google fixed the issue https://issuetracker.google.com/issues/37124582 with https://developer.android.com/jetpack/androidx/releases

Setting Theme.Holo.Light changes everything except checkboxes in list

孤人 提交于 2019-12-05 18:19:40
<style name="CustomTheme" parent="@android:style/Theme.Holo.Light"> I made my own theme and added a reference to it in my manifest. Everything looks perfect (buttons, textboxes etc) except for the checkboxes in my custom list. android:checkMark="?android:attr/listChoiceIndicatorMultiple" The checkbox in my listitem is the default checkbox from Theme.Holo and I can't figure out why. Grateful for any help! I am having the same problem. I have no idea why it isn't choosing the correct checkbox - you can barely see it on the light background. For now, I copied the appropriate holo light checkbox

Data Binding with theme attributes

瘦欲@ 提交于 2019-12-05 15:53:58
问题 I am trying out the new Android Databinding Library and I wanted to set the background color of ToolBar using a binding. By default the color should be colorPrimary (from the theme). Before I was using DataBinding, my toolBar looked like <android.support.v7.widget.Toolbar android:id="@+id/mainToolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" /> After adding a binding, I wanted to set its background to colorPrimary

How to fix cut-off custom SearchView background in landscape?

不打扰是莪最后的温柔 提交于 2019-12-05 12:37:26
I've followed the great answer for this question to make the SearchView widget in my ActionBar fit a custom theme. It works just fine for portrait mode, but in landscape the OS will shrink the height of the ActionBar to maximize content screen estate. Instead of fitting the SearchView widget without margins into the ActionBar just like the other items, it is chopped off at the top: I've dug through the res-folder of the Android source, but could not find any specialized layouts or resources that would make obvious how to fix this or even how Android itself manages to fit the default Holo

Android numberpicker theme (plus minus buttons)

荒凉一梦 提交于 2019-12-05 12:00:58
I would like to change the NumberPicker theme, instead of the three value theme (eg: value 10): 9 10 11 I would like to have the plus and the minus button and the numer 10 in the middle. I read this: http://developer.android.com/reference/android/widget/NumberPicker.html I should change only the theme, to obtain what I wish. But how? I can't set the theme in my fragment: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/gradient

Change Android Actionbar subtitle colour

为君一笑 提交于 2019-12-05 11:33:39
问题 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