android-theme

Change Android Dialog button text size via styles

旧时模样 提交于 2019-12-23 07:12:59
问题 I am trying to enlarge the text size on all of my applications dialog buttons via styles. The following code will change the buttons background colour and even the text case but for some reason the textSize item is not honoured: <style name="MyAppTheme" parent="@android:style/Theme.Holo"> <item name="android:dialogTheme">@style/MyApp.Dialog</item> <item name="android:alertDialogTheme">@style/MyApp.Dialog.Alert</item> </style> <style name="MyApp.Dialog" parent="@android:style/Theme.Holo.Dialog

How to make spinner like actionbar in native android

筅森魡賤 提交于 2019-12-23 04:05:49
问题 After using Actionbar i thought that what if same widget could be available for native android platform. I dont know if we can grab the styles and apply it to native widgets from actionbar apis(compatibility library v4) or not. What i am asking is spinner widget like below which is mostly used in actionbar. Check for dropdown widget. Is it possible to use the same in native like in Listview ? Many thanks. 回答1: adapter = new ArrayAdapter<CharSequence>(this,android.R.layout.simple_spinner_item,

How to set color of selection in EditText in my custom theme? (android)

a 夏天 提交于 2019-12-23 01:12:34
问题 I created my custom theme and in my layouts I have a couple of EditText views. Since I set android:selectAllOnFocus="true" ,I've noticed that the color of selection is default one for my phone, so I was wondering can I set some attribute and which, of course, in my definition of my theme to have a desired effect, i.e. set the color of selection to needed color? Best, Deveti 回答1: Set android:textColorHighlight to your preferred color. 来源: https://stackoverflow.com/questions/28466172/how-to-set

How to set color of selection in EditText in my custom theme? (android)

瘦欲@ 提交于 2019-12-23 01:12:17
问题 I created my custom theme and in my layouts I have a couple of EditText views. Since I set android:selectAllOnFocus="true" ,I've noticed that the color of selection is default one for my phone, so I was wondering can I set some attribute and which, of course, in my definition of my theme to have a desired effect, i.e. set the color of selection to needed color? Best, Deveti 回答1: Set android:textColorHighlight to your preferred color. 来源: https://stackoverflow.com/questions/28466172/how-to-set

Xamarin Forms custom theme not working

♀尐吖头ヾ 提交于 2019-12-22 19:25:10
问题 I have an Android app that uses Xamarin Forms 2.0. I made a custom theme to set some colors. I created these files: Resources/values/styles.xml (AndroidResource) <?xml version="1.0" encoding="utf-8" ?> <resources> <style name="SmartbitLight" parent="SmartbitLight.Base"> </style> <style name="SmartbitLight.Base" parent="Theme.AppCompat.NoActionBar"> <item name="colorPrimary">@color/blueLight</item> <item name="colorPrimaryDark">@color/blueDark</item> <item name="colorAccent">@color/grey</item>

SeekBar Holo Theme using Support Library

大城市里の小女人 提交于 2019-12-22 10:17:20
问题 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

Regarding removal of Activity Title bar in Android

青春壹個敷衍的年華 提交于 2019-12-22 05:41:47
问题 i have already set the theme of my activity as android:theme = "@android:style/Theme.Dialog" but i also want to remove the title bar of the activity. so how to use android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" along with the dialog theme. 回答1: Try creating a custom style that extends Theme.Dialog : <resources> <style name="DialogNoTitle" parent="android:Theme.Dialog"> <item name="android:windowNoTitle">true</item> </style> </resources> 回答2: I believe you can specify this in

Primary color (sometimes) goes transparent

偶尔善良 提交于 2019-12-22 04:38:05
问题 I am developing with the latest SDK version (API 21) and Support Library 21.0.2 and I've been having trouble when trying to implement the new Material Design guidelines. Material Design says that I need to have my primary color and my accent color and apply them over my app. But sometimes when I open the app the primary color becomes transparent in some widgets, it goes back to normal until I close the app (with the Back Button) and launch it again. Here is an example of the primary color

Is it possible to reference attributes from styles.xml file?

独自空忆成欢 提交于 2019-12-21 20:59:04
问题 I want to give the user the possibility to switch the colors skin of my entire application. I mean to switch the style of some custom views of the app dynamically when the user presses a button of the screen. I know that if you call Activity.setTheme() before onCreate() method, you can change the theme of the app dynamically, but normal Views (for example, NavigationView ) with custom styles applied on their xml layout, do not have setTheme or setStyle methods, so it is does not appear

Color values for Buttons (Normal state) in holo dark theme ICS

放肆的年华 提交于 2019-12-21 20:58:52
问题 Need help regarding the color codes for buttons in HOLO DARK theme ICS. This question throws light into all the color codes for Holo theme except for the buttons in normal state. Thanks in advance. basic buttons holo theme ics. 回答1: Ive got it now. If you want the default colors of Android ICS; you just have to go to your Android SDK and look after platforms\android-15\data\res\values and then colors. There you go: <!-- For holo theme --> <drawable name="screen_background_holo_light">