android-theme

android search dialog customization

♀尐吖头ヾ 提交于 2019-11-27 09:45:58
After several searches I couldn't figure out how to customize the search dialog (the top search bar that appears when you click the search button). I want to change the background color of the search bar. I got articles on how to customize a title bar. But that doesn't work for search bar. Any helpful pointers please... It seems that it's not customizable: https://groups.google.com/forum/?fromgroups=#!topic/android-developers/ZqZ-KZPLGtk 来源: https://stackoverflow.com/questions/13936674/android-search-dialog-customization

android themes - defining colours in custom themes

吃可爱长大的小学妹 提交于 2019-11-27 07:39:25
I am sure there is a simple answer to that yet I just cant find it so I throw it into stackoverflow ... ;-) I will just put it into an example. I have an android app where the user can choose the theme in the preferences - dark or light theme. Depending on the chosen theme I have to adjust 20 colors in my app. So I have the hope that I can define colours in the theme and then use the names of this so defined colours in the my TextViews etc. Yet so far I cant figure out how to do that and can't find any solution here and there. I really dont want to define an extra dark and light style for each

EditText with custom theme shows underline under selection handle

橙三吉。 提交于 2019-11-27 07:15:29
问题 i am trying to modify the underline color of a EditText by applying a theme. Style: <style name="MyTheme.EditText" parent="Widget.AppCompat.EditText"> <item name="colorControlActivated">@color/green</item> </style> EditText: <EditText android:id="@+id/editText_amount" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/hint_enter_amount" android:theme="@style/MyTheme.EditText"/> Basically it works, but when i try to select or move the cursor the

How to set Toolbar text and back arrow color

試著忘記壹切 提交于 2019-11-27 06:02:44
Toolbar background is dark color, I want text and back arrow to be white. I tried following, but it doesnt work. <style name="Theme.MyTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/blue</item> <item name="colorPrimaryDark">@color/blue_darker</item> <item name="colorAccent">@color/purple</item> <!-- item name="android:textColorPrimary">@color/white</item--> // I don't want to set this, changes everywhere. <item name="android:textColorSecondary">@color/white</item> <item name="android:toolbarStyle">@style/AppTheme.ToolbarStyle</item> <item name="toolbarStyle"

What are the default color values for the Holo theme on Android 4.0?

ε祈祈猫儿з 提交于 2019-11-27 05:54:49
Does anyone have access to a list of the default colours used in the Holo them (light and dark) on Android 4.0? I'm looking for things like list backgrounds, primary and secondary text, ActionBar, etc. Google gives some examples at the Themes and Color style guidelines, but they don't really go into the actual color values being used. I can grab them from the images, but I’d rather use something a little more accurate. perhaps this is what you're looking for: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/colors.xml If you want the default colors of Android

Theme dependent colors of selected widgets

瘦欲@ 提交于 2019-11-27 05:22:44
问题 I'm pretty sure that this question already has been answered somewhere. It just seems too common. But I can't find the answer. I can't also figure out the solution. Here's the problem: I want one of my TableRow's to have different background color. It's simple, I just need to add android:background="#123456" In TableRow's XML Declaration. But, I also want my application to have two themes. In the other theme, the TableRow should have different background color. I just can't find a way to

Android how to get AppCompat.Translucent type theme with support actionbar?

这一生的挚爱 提交于 2019-11-27 05:07:54
问题 I would like to add the support actionbar to one of my activities, I previously had been using the theme.translucent with this activity but in order to make the support actionbar work I needed to inherit the Theme.AppCompat, I need to maintain a translucent theme in this activity but unfortunately there isnt a Theme.AppCompat.translucent that i can see by default, is there any way that this can be done? 回答1: You can create a new set of styles to use which have the same properties as Theme

AppCompat DayNight theme not work on Android 6.0?

烂漫一生 提交于 2019-11-27 03:21:07
问题 I am using the new Theme.AppCompat.DayNight added in Android Support Library 23.2 On Android 5.1 it works well. On Android 6.0, activity looks like using light theme, but dialog looks using dark theme. My Application class: public class MyApplication extends Application { static { AppCompatDelegate.setDefaultNightMode( AppCompatDelegate.MODE_NIGHT_YES); } } My styles.xml <style name="AppTheme" parent="Theme.AppCompat.DayNight"> <item name="colorPrimary">@color/colorPrimary</item> <item name=

How do I style appcompat-v7 Toolbar like Theme.AppCompat.Light.DarkActionBar?

你离开我真会死。 提交于 2019-11-27 02:33:28
I'm trying to recreate the look of Theme.AppCompat.Light.DarkActionBar with the new support library Toolbar. If I choose Theme.AppCompat.Light my toolbar will be light and if I choose Theme.AppCompat it will be dark. (Technically you have to use the .NoActionBar version but as far as I can tell the only difference is <style name="Theme.AppCompat.NoActionBar"> <item name="windowActionBar">false</item> <item name="android:windowNoTitle">true</item> </style> Now there's no Theme.AppCompat.Light.DarkActionBar but naively I thought it'd be good enough to just make my own <style name="Theme

Get the Theme value applied for an activity programmatically

 ̄綄美尐妖づ 提交于 2019-11-27 02:32:30
问题 I want to know which theme is applied for an Activity in an application. Normally we are setting the theme by using setTheme(android.R.style.Theme_Light); Here we are specifying style, As like this can we able to get the specific style type exactly applied for an activity programmatically. Thanks 回答1: Context class has a nice method called getThemeResId , however it's private thus you need to use reflection. Here's an example: @Override protected void onCreate(Bundle savedInstanceState) {