android– 这个TableLayout布局或其LinearLayout父级如何解决此警告是无用的

android– 这个TableLayout布局或其LinearLayout父级如何解决此警告是无用的,第1张

概述我在linelayout里面有tablelayout,但它向我显示了这条警告信息 此TableLayout布局或其LinearLayout父级是无用的 如何克服这个警告可以帮助我. 提前致谢<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apkes/andr

我在linelayout里面有tablelayout,但它向我显示了这条警告信息
 此tableLayout布局或其linearLayout父级是无用的
 如何克服这个警告可以帮助我.
 提前致谢

<?xml version="1.0" enCoding="utf-8"?>      <linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"          androID:layout_wIDth="match_parent"          androID:layout_height="match_parent" >          <tableLayout>            <tableRow                androID:ID="@+ID/tableRow3"                androID:layout_wIDth="wrap_content"                androID:layout_height="wrap_content"                androID:layout_gravity="center" >                <TextVIEw                    androID:ID="@+ID/txtPass"                    androID:layout_wIDth="wrap_content"                    androID:layout_height="wrap_content"                    androID:layout_gravity="center_vertical|center_horizontal"                    androID:text="Password"                    androID:textSize="18sp"                    androID:wIDth="100dp" />                <EditText                    androID:ID="@+ID/edPass"                    androID:layout_wIDth="200dp"                    androID:layout_height="wrap_content"                    androID:inputType="textPassword"                    androID:password="true" >                    <requestFocus />                </EditText>              </tableRow>          </tableLayout>      </linearLayout>

解决方法:

除了tableLayout之外,当你在linearLayout里面没有任何东西时,为什么你需要最顶级的linearLayout?其中一个布局应该足够了.删除linearLayout(或)tableLayout.那应该解决这个问题.

总结

以上是内存溢出为你收集整理的android – 这个TableLayout布局或其LinearLayout父级如何解决此警告是无用的全部内容,希望文章能够帮你解决android – 这个TableLayout布局或其LinearLayout父级如何解决此警告是无用的所遇到的程序开发问题。

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

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

原文地址:https://www.54852.com/web/1115445.html

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

发表评论

登录后才能评论

评论列表(0条)

    保存