java– 布局参数layout_weight被忽略,除非在标记上也指定了layout_width和layout_height

java– 布局参数layout_weight被忽略,除非在标记上也指定了layout_width和layout_height,第1张

概述我将此消息视为错误,无法运行该应用程序.<includeandroid:layout_weight="1"layout="@layout/button_row"/><includeandroid:layout_weight="1"layout="@layout/button_row"/><includeandroid:layo

我将此消息视为错误,无法运行该应用程序.

    <include     androID:layout_weight="1"    layout="@layout/button_row"/><include     androID:layout_weight="1"    layout="@layout/button_row"/><include     androID:layout_weight="1"    layout="@layout/button_row"/>     <include     layout="@layout/button_row"    androID:layout_weight="1"/>   

androID:layout_weight =“1”这行会导致错误.但是,它们使布局文件看起来像需要(在屏幕截图中)

以下是include标记中的内容

   <style name="Remotebutton">    <item name="androID:layout_wIDth"> 0dp </item>    <item name="androID:layout_height"> match_parent </item>`

如何让它看起来像我需要没有错误?谢谢

解决方法:

将styles.xml更改为此
它将工作相同

<style name="Remotebutton">    <item name="androID:layout_wIDth"> 0dp </item>    <item name="androID:layout_height"> match_parent </item>    <item name="androID:layout_weight">1</item><style>
总结

以上是内存溢出为你收集整理的java – 布局参数layout_weight被忽略,除非在标记上也指定了layout_width和layout_height全部内容,希望文章能够帮你解决java – 布局参数layout_weight被忽略,除非在标记上也指定了layout_width和layout_height所遇到的程序开发问题。

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

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

原文地址: http://outofmemory.cn/web/1120416.html

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

发表评论

登录后才能评论

评论列表(0条)

保存