android:layout:如何使我的对话框充满XML

android:layout:如何使我的对话框充满XML,第1张

概述我正在尝试打开一个对话框以覆盖大部分屏幕(这意味着它仍然具有很好的四舍五入效果,但覆盖了后面的内容)我一直在尝试填充父对象,但它的行为像包装内容一样<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apkes/android"

我正在尝试打开一个对话框以覆盖大部分屏幕(这意味着它仍然具有很好的四舍五入效果,但覆盖了后面的内容)

我一直在尝试填充父对象,但它的行为像包装内容一样

<?xml version="1.0" enCoding="utf-8"?><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    androID:layout_wIDth="fill_parent"    androID:layout_height="fill_parent"    androID:orIEntation="vertical"    androID:layout_centerHorizontal="true" ><linearLayout    androID:g@R_301_6610@ty="center_horizontal"    androID:orIEntation="vertical"    androID:layout_wIDth="fill_parent"    androID:layout_height="fill_parent">    <SurfaceVIEw androID:ID="@+ID/surface"        androID:layout_wIDth="400px"        androID:layout_height="200px"        androID:layout_centerHorizontal="true">    </SurfaceVIEw>    <button androID:ID="@+ID/button01"        androID:layout_wIDth="wrap_content"        androID:layout_height="wrap_content"        androID:layout_centerHorizontal="true"        androID:text="Ok, Let me play !!!" /></linearLayout></linearLayout>

我在这里尝试了解决方案

@L_404_0@

dialog.getwindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);

它可以满足我的要求

所以现在我想知道xml中的耗损是什么(如果可以帮助的话,我尝试将所有布局行为放入xml中而不是代码中,^^)

解决方法:

据我了解,解决@L_404_0@的问题是在加载xml之后必须修改布局.基本上没有XML可以单独执行此 *** 作.

总结

以上是内存溢出为你收集整理的android:layout:如何使我的对话框充满XML全部内容,希望文章能够帮你解决android:layout:如何使我的对话框充满XML所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1071311.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存