android-theme

Android: cannot resolve appcompat-v7 themes

流过昼夜 提交于 2019-12-05 08:39:40
In themes.xml , I would like to change a theme from Theme.Holo.Light.DarkActionBar to Theme.AppCompat.Light.DarkActionBar but I get: cannot resolve symbol '@android:style/Theme.AppCompat.Light.DarkActionBar' In the gradle file I added: compile 'com.android.support:appcompat-v7:22.1.1' I am using: compileSdkVersion 22 buildToolsVersion "22.0.1" I have also run gradle's clean command, but nothing seems to change. Any ideas? The AppCompat themes are not part of the built-in styles. You have to reference them without the '@android:style' prefix. Just use something like: <style name="AppTheme"

Primary color (sometimes) goes transparent

馋奶兔 提交于 2019-12-05 03:23:35
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 being transparent in my toolbar. I am using Teal 500 as my primary color and, as you can see, it is

Android Action Bar: Changing the color of Action Buttons

旧街凉风 提交于 2019-12-05 01:07:10
问题 I have an app with an action bar that looks like this: I would like the text of the menu action buttons "Home" and "Logout" to be white as well. How can I change their text color? Let me know if you want to see any code. Thanks! 回答1: As i perceive it this is a simple attribute called android:actionMenuTextColor . To use it properly you should create your own styles, like this: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="myTheme" parent="@android:style/Theme.Holo.Light">

Adding TextInputLayout dynamically throws Exception

。_饼干妹妹 提交于 2019-12-04 20:22:10
I have been trying to add a TextInputLayout dynamically. Whenever a RadioButton will be clicked, a TextInputLayout will be added under a LinearLayout . But after all this, I am getting an exception -- java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library. Although the app is not crashing, but the code below the point of this error is not getting executed. I have searched all over StackOverflow and other websites as well, looking for a solution, but whatever was mentioned there looks like I already have done it. Here goes what I have

Android Action Bar not showing on displayOptions - useLogo

感情迁移 提交于 2019-12-04 18:01:29
I have an actionBarStyle that I have implemented in my app for my ActionBar . Here is the xml code below: <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="MyActionBarTheme" parent="@android:style/Theme.Holo"> <item name="android:windowActionBarOverlay">true</item> <item name="android:actionBarStyle">@style/MyCustomActionBar</item> </style> <style name="MyCustomActionBar" parent="@android:style/Widget.Holo.ActionBar"> <item name="android:background">@android:color/transparent</item> <item name="android:backgroundSplit">@android:color/transparent</item> <item

Invisible ActionMode item icons in Theme.Sherlock.Light.DarkActionBar

风格不统一 提交于 2019-12-04 17:56:28
问题 When using Theme.Sherlock.Light.DarkActionBar (or Theme.Holo.Light.DarkActionBar , doesn't make a difference), the ActionMode (or "contextual ActionBar") that appears for example when selecting text, is by default styled the same way as in the standard dark theme, that is dark blue with light action icons. However, when you try to select a text in a Dialog (which is light-styled in this theme, in contrast to the black ActionBar), an ActionMode styled as in the Light theme (white background)

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

自闭症网瘾萝莉.ら 提交于 2019-12-04 17:28:51
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. 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">#fff3f3f3</drawable> <drawable name="screen_background_holo_dark">#ff000000</drawable> <color name="background_holo

Android default theme

血红的双手。 提交于 2019-12-04 17:26:07
问题 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? 回答1: The

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

你离开我真会死。 提交于 2019-12-04 17:06:35
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 possible to change their style dynamically. I think that my objective would be possible referencing colors

Rendering Problems while changing the theme

家住魔仙堡 提交于 2019-12-04 12:13:44
问题 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 /