Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: App Compat Theme - Dialog When Large

I want to use AppCompat library, however there is no Dialog theme, and there is no DialogWhenLarge theme which I can either extend or use.

Is there a way I can extend the base theme and make it DialogWhenLarge, probably using folders and custom styling items.

Thanks

like image 604
Aiden Fry Avatar asked Aug 26 '13 22:08

Aiden Fry


1 Answers

Closing this ticket down. For anyone who would like the answer see this.

ActionBar in a DialogFragment

and this custom style in folder values-large

<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
    <!-- API 14 theme customizations can go here. -->
</style>

 <style name="MyAppCompatDialogTheme" parent="AppBaseTheme">
    <item name="android:windowIsFloating">false</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowSoftInputMode">stateAlwaysHidden</item>
    <item name="android:windowActionModeOverlay">true</item>
    <item name="android:windowIsTranslucent">true</item>
</style>

However I think I have decided to go down the route of using a DialogFragment which i can then load into an activity on the phone, or show as a dialog on tablet, rather than this semi-mashed way of turning an activity into a dialog.

like image 107
Aiden Fry Avatar answered Oct 21 '22 00:10

Aiden Fry