机器人:如何调整对话框对话框、机器人

2023-09-07 01:01:13 作者:拿可爱换你

我想创建一个对话框式的形式,将填补更大的屏幕面积(左,右,上,下​​边距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);

将显示对话框通过以下方式:

The dialog is displayed the following way:

有谁知道如何使对话较大(扩展高度)?

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.