android-theme

Getting AppCompat does not support the current theme features exception after upgrading to version AppCompat v22.1.0 issue

久未见 提交于 2019-12-01 18:17:30
Previously i was using AppCompat with version 21.1.2 in my project for the purpose of material design toggle with toolbar. But after upgrading to AppCompat v22.1.0, my app has started working weird. I even tried some of the solutions like as follows <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> Also applying parent theme as <style name="AppTheme" parent="Theme.AppCompat.NoActionBar"> But none of the above solutions was not helpful for me. So kindly please help me by your tips and suggestions to overcome my issue which i am currently facing. I am also posting

set background Image to whole application in android

匆匆过客 提交于 2019-12-01 16:18:39
I want to set background image to my application in android. So my application already has a theme set in my manifest file like this <application android:theme="@android:style/Theme.NoTitleBar" /> Now this was implemented from the themes of android package. Now i want to add a background image to my entire application how can i do it. <style name="Theme.NoTitleBar.BackgroundImage"> <item name="android:background">@drawable/bitzer_background</item> </style> I want the Theme.NoTitleBar as well. You have to use styles to achieve this Check out this link Create a theme with your background and use

Why AppCompat does not support the current theme features windowActionBar: false

假装没事ソ 提交于 2019-12-01 14:21:04
Why AppCompat does not support the current theme features { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2473) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2535) at android.app.ActivityThread.access$1100(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1396) at

MediaRouteActionProvider connection dialog theme

大憨熊 提交于 2019-12-01 11:34:37
I've tried to change theme of the MediaRouteActionProvider connection dialog. I using in my application a Light theme with Dark Actionbar, so the dialog have dark gray content, but the background is dark.. When the app is connected to a device, the other dialogs are ok, they have white background with the correct theme. (For exmaple in VideoMediaRouteControllerDialog and on the disconnect dialog.) Have you any idea, how can I change the connection dialog's theme? Thank you very much! // Screenshot 1 : Connection dialog (with the theme issue) // Screenshot 2 : Controller dialog (with the right,

Change Activity theme deppending on fragment in use Android

故事扮演 提交于 2019-12-01 10:50:12
I have an activity that switches between several fragments. This activity has a default style, but when i change to some particular fragments i want it to change the style. I've done some research and i got this code that i run in the onCreateView() of a fragment: // create ContextThemeWrapper from the original Activity Context with the custom theme Context context = new ContextThemeWrapper(getActivity(), R.style.GreyTheme); // clone the inflater using the ContextThemeWrapper LayoutInflater localInflater = inflater.cloneInContext(context); // inflate using the cloned inflater, not the passed

MediaRouteActionProvider connection dialog theme

白昼怎懂夜的黑 提交于 2019-12-01 08:51:56
问题 I've tried to change theme of the MediaRouteActionProvider connection dialog. I using in my application a Light theme with Dark Actionbar, so the dialog have dark gray content, but the background is dark.. When the app is connected to a device, the other dialogs are ok, they have white background with the correct theme. (For exmaple in VideoMediaRouteControllerDialog and on the disconnect dialog.) Have you any idea, how can I change the connection dialog's theme? Thank you very much! /

background issue with styles and themes

▼魔方 西西 提交于 2019-12-01 07:40:02
in attrs I have <attr name="bzz" format="color" /> then in theme <style name="mytheme" parent="android:Theme"> <item name="bzz">@color/aaa</item> </style> and in the code this works great tv.setBackgroundResource(R.color.aaa); but when I do this it gives me an error tv.setBackgroundResource(R.attr.bzz); I do not understand what is the problem, my logic is that I set the bzz as reference to color so that should work fine, but it does not :) it says like android.content.res.Resources$NotFoundException: Resource ID #0x7f010008 but I do not understand what resource can't be found ? I am sure that

What causes android exception “You need to use a Theme.AppCompat theme (or descendant) with this activity.”

喜欢而已 提交于 2019-12-01 07:22:53
问题 I am attempting to try out the new Material Theme in Android. I am currently stuck with this exception 03-06 09:35:50.177: D/AndroidRuntime(30607): Shutting down VM 03-06 09:35:50.178: E/AndroidRuntime(30607): FATAL EXCEPTION: main 03-06 09:35:50.178: E/AndroidRuntime(30607): Process: com.example.vivz, PID: 30607 03-06 09:35:50.178: E/AndroidRuntime(30607): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.vivz/com.example.vivz.MainActivity}: java.lang

“…must supply a layout_height…” but its in my style resources?

有些话、适合烂在心里 提交于 2019-12-01 02:15:46
I had a working app on 2.1 and above until I tried to cleanup my initial layout with a theme of styles. Now the app won't even start with the "You must supply a layout_height attribute" failure message pointing to my first EditText View in the layout. Why can I not move the 'layout_height=30dp" that was working fine on every EditText into an ... item name="android:layout_height">30dp< ... in a style referred to via my theme? Virtually all my other style effects I abstracted out like this are working just fine. [It won't surprise me to learn this must be some styled override to the LinearLayout

“Possible overdraw: Root element paints background ”

ぃ、小莉子 提交于 2019-12-01 02:06:28
While running Android Lint on my Project I came across this warning Possible overdraw: Root element paints background @drawable/main with a theme that also paints a background Where inferred theme is @android:style/Theme.NoTitleBar.Fullscreen Can someone explain to me why is this coming and how to remove it ?? My xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/main" //***LINT warning*** android:orientation="vertical" android:weightSum="3" > The part of manifest