I created one application with built-in version 5.0. I have a theme for the topic below.
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimaryDark">@color/actionbar_color</item> <item name="colorPrimary">@color/actionbar_color</item> <item name="colorAccent">@color/actionbar_yellow_color</item> <item name="android:windowContentOverlay">@null</item> <item name="android:textColorPrimary">@color/edit_text_color</item> <item name="android:windowBackground">@drawable/ic_app_background</item> </style>
When I set actionbar_color = "# 4DFFFFFF" My application crashed. If I used any non-alpha color, it works fine, I mean, if I set the color code for actionbar_color = "# FFFFFF ".
Error: the main color of the TaskDescription task should be opaque. I checked this Android 5.0 solution : how to change the overview of the Task Header screen in the background, but got the same error for the alpha color. I follow transparency color hex color transparency
Crash log
03-20 05: 59: 41.323: E / AndroidRuntime (2133): FATAL EXCEPTION: main
03-20 05: 59: 41.323: E / AndroidRuntime (2133): Process: com.mytaxback, PID: 2133
03-20 05: 59: 41.323: E / AndroidRuntime (2133): java.lang.RuntimeException: Unable to start activity ComponentInfo {com.mytaxback / com.mytaxback.LoginActivity}: java.lang.RuntimeException: A TaskDescription primary color should be opaque
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2298)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2360)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityThread.access $ 800 (ActivityThread.java:144)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1278)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.os.Handler.dispatchMessage (Handler.java:102)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.os.Looper.loop (Looper.java:135)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityThread.main (ActivityThread.java:5221)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at java.lang.reflect.Method.invoke (Native Method)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at java.lang.reflect.Method.invoke (Method.java data72)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:899)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:694)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): Caused by: java.lang.RuntimeException: A TaskDescription primary color should be opaque
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityManager $ TaskDescription. (ActivityManager.java►36)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.Activity.onApplyThemeResource (Activity.java:3677)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.view.ContextThemeWrapper.initializeTheme (ContextThemeWrapper.java:140)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.view.ContextThemeWrapper.setTheme (ContextThemeWrapper.java:85)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2244)
03-20 05: 59: 41.323: E / AndroidRuntime (2133): ... 10 more
I ran into this problem in 5.0 OS emulator. His work works great with ICS, KITKAT Give me any suggestions. Thanks,
android material-design android-theme
Bhavin chauhan
source share