安卓应用程序兼容性主题 - 对话框当大兼容性、对话框、应用程序、主题

由网友(遇弱则强)分享简介:我想用AppCompat库,但是没有对话的主题,并没有DialogWhenLarge主题,我可以扩展或使用。I want to use AppCompat library, however there is no Dialog theme, and there is no DialogWhenLarge theme...

我想用AppCompat库,但是没有对话的主题,并没有DialogWhenLarge主题,我可以扩展或使用。

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.

有没有一种方法,我可以扩展基本主题,并使其DialogWhenLarge,可能使用的文件夹和自定义样式的项目。

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

感谢

推荐答案

关闭这张票了。对于任何人谁想要的答案看到这一点。

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

动作条在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>

不过,我想我已经决定去使用DialogFragment的途径,我可以再加载到一个活动在手机上,或显示为在平板电脑上的对话,而不是这种半泥转向的活动进入方式一个对话框。

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.

阅读全文

相关推荐

最新文章