让Android的活动看起来像对话框对话框、Android

由网友(昔云楚楚)分享简介:我想开小窗口点击对话框。我的问题解决了剥皮活动开始点击与安卓主题=@安卓风格/ Theme.Dialog。不幸的是我不能达到一个对话相同的外观。 I am trying to open a dialog on widget click. I have solved the problem skinning the a...

我想开小窗口点击对话框。我的问题解决了剥皮活动开始点击与安卓主题=@安卓风格/ 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 ?

阅读全文

相关推荐

最新文章