Skip to content

Commit 1b106c6

Browse files
SpiritCrocdmfs
authored andcommitted
Theme.MaterialDialog needs to be AppCompat (#470)
When trying to create widget: 10-28 15:12:24.529 26747 26747 E AndroidRuntime: FATAL EXCEPTION: main 10-28 15:12:24.529 26747 26747 E AndroidRuntime: Process: org.dmfs.tasks, PID: 26747 10-28 15:12:24.529 26747 26747 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.dmfs.tasks/org.dmfs.tasks.homescreen.TaskListWidgetSettingsActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:351) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:320) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:281) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at org.dmfs.tasks.homescreen.TaskListWidgetSettingsActivity.onCreate(TaskListWidgetSettingsActivity.java:47) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6975) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) 10-28 15:12:24.529 26747 26747 E AndroidRuntime: ... 9 more Change-Id: Ibdd7ffff6c9db7299c33e057fc48e5d7e058f1b4
1 parent 9aa367c commit 1b106c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

opentasks/src/main/res/values-v11/styles.xml

-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,4 @@
134134
<item name="android:layout_height">@dimen/abc_action_bar_default_height_material</item>
135135
</style>
136136

137-
<style name="Theme.MaterialDialog"
138-
parent="@android:style/Theme.Holo.Light.Dialog.NoActionBar"></style>
139-
140137
</resources>

opentasks/src/main/res/values/styles.xml

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@
272272
</style>
273273

274274
<style name="Theme.MaterialDialog"
275-
parent="@android:style/Theme.Dialog"></style>
275+
parent="@style/Theme.AppCompat.Light.Dialog">
276+
<item name="windowActionBar">false</item>
277+
<item name="windowNoTitle">true</item>
278+
</style>
276279

277280
<style name="details_label_icon"
278281
parent="field_view_text_value">

0 commit comments

Comments
 (0)