用行动吧对话主题活动 [英] Dialog themed activity with action bar

查看:142
本文介绍了用行动吧对话主题活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在V3的Andr​​oid应用程序,是否有可能,有一个对话的主题活动(如:Theme.Holo.Dialog)有一个动作吧?我试图调整windowIsFloating属性,但造成沿actionbarimpl不兼容的线的异常,这表明当前的对话主题不支持的动作条?

In a v3 android application, is it possible for an activity that has a dialog theme (e.g.: Theme.Holo.Dialog) to have an action bar? I tried adjusting the windowIsFloating Attribute, but that caused an exception along the lines of "actionbarimpl not compatible", indicating that the current dialog theme does not support action bars?

这应该可以作为三星Galaxy Tab多个应用程序具有对话与行动吧。

It should be possible as several applications on the Samsung Galaxy Tab have dialogs with action bars.

感谢。

推荐答案

对话的主题是不是为了显示动作条。 阅读以了解更多信息。

The Dialog Theme wasn't designed to display an ActionBar. Read this for more information.

当使用一个对话框,你希望用户不同的选项之间进行选择,并做出一些​​决定。我不知道您的用例是什么,但你最好更改用户界面化设计,让您可以管理您的用例与另一种解决方案。一个解决方案的Andr​​oid是专为。

When using a Dialog you want the user to choose between different options and make some decisions. I don't know what your Use-Case is but you better change your UI-Design so that you can manage your use-case with another solution. A solution Android was designed for.

如果你真的想用一个对话框,一个动作条,您可以通过使用创建自己的   自定义对话框,提供自定义布局,并建立一个动作条克隆布局

If you really want to use a Dialog with a ActionBar, you can create your own by using a Custom Dialog with a custom layout and build a ActionBar clone-layout.

这篇关于用行动吧对话主题活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆