自定义对话框还没有在标题之下除法 [英] Custom dialog hasn't divider under the title
问题描述
在官方文档有如何创建自定义对话框的一篇文章一>。而且也有结果对话框的图片具有梯度下边框它的标题。
At the official documentation there is an article of how to create custom dialogs. And there is also a picture of result dialog which have gradient border under it's title.
当我复制此code到我的机器上运行它,看看结果我没有得到的对话框
When I copy this code to run it on my machine and look at the results I get the dialog without gradient divider between the dialog's title and it's content:
这是正常的行为,如果是,告诉我怎么可以我自己通过code添加分隔,或使用样式机制?
Is this normal behavior and if it is, tell me how can I add divider by myself through the code, or using styles mechanism?
推荐答案
是的,这是自定义对话框中的正常行为。有以下分标题使用这样的:
Yes this is a normal behavior for custom dialog. To have the divider below title use something like:
<View
android:layout_width="fill_parent"
android:layout_height="0.03dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginBottom="5dip"
android:background="#404040" />
在您拥有的ImageView和TextView的布局上面您的自定义布局。
in your custom layout above the layout in which you have the imageview and textview.
这篇关于自定义对话框还没有在标题之下除法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!