Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top