android:如何调整对话框大小 [英] android: how to resize dialog
本文介绍了android:如何调整对话框大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个对话风格的表单,填写更大的屏幕区域(左,右,上,下填充10px)。
I would like to create a dialog-style form which would fill the bigger screen area (left, right, top, bottom padding 10px).
我定义了风格CupCakeDialog如下:
I defined the style "CupCakeDialog" the following way:
<style name="CupcakeDialog" parent="android:Theme.Dialog">
<item name="android:windowAnimationStyle">@null</item>
</style>
并运行该活动:
getWindow().requestFeature(Window.FEATURE_PROGRESS);
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.ad_popup);
对话框显示如下:
alt text http://img199.imageshack.us/img199/1299/popupstackoverflow。 png
有谁知道如何使对话框更大(扩展高度)?
Does anyone know how to make the dialog bigger (extend height)?
谢谢您!
推荐答案
当您为对话框提供自定义布局时,您应该能够提供顶部和底部填充就像正文一样。
As you're providing a custom layout for the dialog, you should just be able to provide top and bottom padding as normal around the text.
这篇关于android:如何调整对话框大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文