android-theme

What theme attributes do I need to override to change the blue highlight color of my dialogs?

*爱你&永不变心* 提交于 2019-12-03 13:15:37
问题 I have a theme called "greenhighlight" — this theme was generated using the Android Action Bar Style Generator, and inherits from the default ActionBarSherlock theme. The theme does nothing except change the highlight at the bottom of the ActionBar from blue to green. To theme all my activities, I just do: <application android:theme="@style/Theme.greenhighlight"... This works pretty well for activities (note the green highlight on the bottom of the ActionBar): However, I'm having difficulty

Android 5.0: howto change Overview Screen Task Title background color

拥有回忆 提交于 2019-12-03 12:48:04
The new Android 5.0 Lollipop Overview Screen features each App's Task with a screenshot and a (by default) grey title bar. Some Lollipop Apps (For example the new Play Store) use different colours. How can the colour of the Overview Screen title background be changed? alanv In general, if you're targeting Material then you should set colorPrimary (action bar, recents), colorPrimaryDark (status bar), and colorAccent (check boxes, progress bars, etc) in your theme. That said, you can dynamically change the recents color to be something else using: TaskDescription taskDesc = new TaskDescription

How can I get the primary color from my app theme?

狂风中的少年 提交于 2019-12-03 12:44:24
问题 In my Android java code, how can I reference the color "colorPrimary" set in my theme? I have the following theme definition: <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <item name="colorPrimary">@color/myColor1</item> <item name="colorPrimaryDark">@color/myColor2</item> <item name="colorControlNormal">@color/myColor3</item> <item name="colorControlActivated">@color/myColor4</item> </style> I could reference the color resource directly (R.color.myColor1), but I

Android default theme

折月煮酒 提交于 2019-12-03 11:14:36
I am making one android application but i was thinking about themes.. If i don't declare a theme of my Android application which theme will be used? Where i can find this information? What is the criteria for use one and other? I was thinking about, if i want customize my all application, i have to extend one theme and custom all item that i want to customize. And what if it assumes one of them as default? Weather I have to customize it again? How do i know what is the default one? The default theme varies depending on the API level (to be consistent with the general UI). On API < 10, the

Customize ActionBar TabBar (ActionBarSherlock)

China☆狼群 提交于 2019-12-03 10:03:29
问题 I have been stuck on this issue for some days now. Can anyone help me customize the Tabs displayed below the ActionBar (NavigationMode is NAVIGATION_MODE_TABS ) ? I basically want to change the background color of the tabs and the underline color of the currently selected Tab. So far this is what I have done, yet it doesn't work. I am using ActionBarSherlock . <style name="Theme.Styled" parent="@style/Theme.Sherlock.Light"> <item name="actionBarStyle">@style/Widget.Theme.Styled.ActionBar<

Set Android Theme.Light for Alert Dialog

不问归期 提交于 2019-12-03 09:30:40
I am trying to set the android Theme.Light theme for my alert dialog, but with no success so far. After reading a few tutorials I gathered that using AlertDialog.Builder we cannot set the theme directly in the constructor (atleast in API level 7). The alternate solution that I found is using a ContextThemeWrapper , which everyone assured would solve my problem. So I coded something like this: AlertDialog.Builder builder = new AlertDialog.Builder( new ContextThemeWrapper(context, R.style.popup_theme)); I described my theme in the values folder: <?xml version="1.0" encoding="utf-8"?> <resources>

Style Android SearchView Drop down popup

感情迁移 提交于 2019-12-03 08:22:16
问题 I would like to know how to style the drop down popup of the Android 4.0 SearchView ? I'm using the Theme.Sherlock.Light.DarkActionBar , but I don't know how to style the drop down search into a white background and a black text? 回答1: For some reason theming using the "searchAutoCompleteTextView" wasn't working for me either. So I solved it using the following code when setting up my SearchView: Note: This is all done with the android v7 support/AppCompat library public boolean

Android: default AppTheme background colors

为君一笑 提交于 2019-12-03 08:16:57
问题 What are the default background colors for Activities in Android's AppTheme style? I'm looking for the hex code, or something that I can reference. It should be one for the LIGHT theme and one for the DARK theme. Or where can I look them up? I'm confused by all the files and can't find the place where they actually say the color. Thanks for your help. Update: I found entries in the SDK in /data/values/colors.xml , which are referenced by @android:color/background_holo_light @android:color

Rendering Problems while changing the theme

喜你入骨 提交于 2019-12-03 07:54:14
I'm new to Appdevelopment and trying to change the Theme of my app in Android Studio 1.4.1 (latest) on Windows 10 x64, but I always get exceptions, here is what I do: (yes, I now there are already many questions, but I couldn't find an answer) Start Project (name: TEST) For Phone and Tablet (min. SDK: API 15 Android 4.0.3 IceCreamSandwich) Choose Blank Activity (name: MainActivity) Go to activity_main.xml -> design view Choose Nexus 4; API 23; Holo Light / Holo Dark / Material Light / Material Dark ; (API and Phone doesn't matter => tried a lot) EXCEPTION: Rendering Problems The following

AppCompat v21 Dark ToolBar style

社会主义新天地 提交于 2019-12-03 07:46:03
问题 I want my ToolBar to serve as an ActionBar and I want it to look like a light theme with a dark action bar. I can't seem to find the right combination to do it. This is what I have in styles.xml <style name="Theme.MyTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBar">false</item> <item name="colorPrimary">@color/my_awesome_color</item> <item name="android:textColorPrimary">@color/my_awesome_text_color</item> <item name="colorPrimaryDark">@color/my_awesome_darker