让Android的活动看起来像对话框 [英] Make Android Activity looks like dialog

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

问题描述

我想开小窗口点击对话框。我的问题解决了剥皮活动开始点击与安卓主题=@安卓风格/ Theme.Dialog。不幸的是我不能达到一个对话相同的外观。

I am trying to open a dialog on widget click. I have solved the problem skinning the activity started on click with android:theme="@android:style/Theme.Dialog". Unfortunately I cannot reach the same look of a dialog.

这是结果:

相反,我想达到(当然除了按钮,)这个结果:

Instead, I would like to reach this result (except for the button, of course):

(小部件对话框中你可以看到,把屏幕推)

(the widget dialog you can see keeping the screen pushed)

正如你可以看到有一些区别:列表项的颜色,文字的颜色和列表项分隔符。是否有一个predefined主题/风格,以获得一个标准的对话框的外观相同?如果不是,有什么步骤来达到这个结果呢?

As you can see there are some differences: the color of the list items, the color of the text and the list item separator. Is there a predefined theme/style to obtain the same look of a standard dialog? If not, what are the steps to follow to reach that result?

我已经看到,由FoxyRing提供的小部件有我想有行为。

I have seen that the widget provided by FoxyRing has the behaviour I would like to have.

谢谢!

推荐答案

为什么不使用传统的主要活动有一个透明背景的布局

Why not use a "traditional" Main Activity with a transparent background layout

和从中调用一个标准的对话框?

and call a standard dialog from it ?

......好吧,如果我理解正确的话,这将使在一个非常简单的方法达到目的,不是吗?

... well if I understood you correctly, that would make the trick in a very easy way, isn't it ?

这篇关于让Android的活动看起来像对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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