Skip to content

Commit

Permalink
Theme.MaterialDialog needs to be AppCompat (#470)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SpiritCroc authored and dmfs committed Oct 30, 2017
1 parent 9aa367c commit 1b106c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions opentasks/src/main/res/values-v11/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,4 @@
<item name="android:layout_height">@dimen/abc_action_bar_default_height_material</item>
</style>

<style name="Theme.MaterialDialog"
parent="@android:style/Theme.Holo.Light.Dialog.NoActionBar"></style>

</resources>
5 changes: 4 additions & 1 deletion opentasks/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@
</style>

<style name="Theme.MaterialDialog"
parent="@android:style/Theme.Dialog"></style>
parent="@style/Theme.AppCompat.Light.Dialog">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="details_label_icon"
parent="field_view_text_value">
Expand Down

0 comments on commit 1b106c6

Please sign in to comment.