android – 在TableLayout中浮动Action Button错误的位置

android – 在TableLayout中浮动Action Button错误的位置,第1张

概述正如您所看到的,TableLayout更改了Button,ProgressBar和EditText组件的宽度,但对于我的FloatingActionButton却没有这样做. >这是一张解释我problem的照片 >结果我想要get 在xml中: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 正如您所看到的,tableLayout更改了button,Progressbar和EditText组件的宽度,但对于我的floatingActionbutton却没有这样做.

>这是一张解释我problem的照片
>结果我想要get

在xml中:

<relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    xmlns:tools="http://schemas.androID.com/tools"    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent"    androID:paddingBottom="@dimen/activity_vertical_margin"    androID:paddingleft="@dimen/activity_horizontal_margin"    androID:paddingRight="@dimen/activity_horizontal_margin"    androID:paddingtop="@dimen/activity_vertical_margin"     xmlns:app="http://schemas.androID.com/apk/res-auto"  >   <tableLayout       androID:layout_wIDth="wrap_content"       androID:layout_height="wrap_content"       androID:stretchColumns="*" >       <tableRow           androID:ID="@+ID/tableRow1"           androID:layout_wIDth="wrap_content"           androID:layout_height="wrap_content" >           <androID.support.design.Widget.floatingActionbutton               androID:ID="@+ID/floatingActionbutton04"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:src="@drawable/ic_launcher"               app:elevation="4dp"               app1:fabSize="mini" />           <androID.support.design.Widget.floatingActionbutton               androID:ID="@+ID/floatingActionbutton03"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:src="@drawable/ic_launcher"               app:elevation="4dp" />           <androID.support.design.Widget.floatingActionbutton               androID:ID="@+ID/floatingActionbutton02"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:src="@drawable/ic_launcher"               app:elevation="4dp" />           <androID.support.design.Widget.floatingActionbutton               androID:ID="@+ID/floatingActionbutton01"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:src="@drawable/ic_launcher"               app:elevation="4dp" />           <androID.support.design.Widget.floatingActionbutton               androID:ID="@+ID/myFAB"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:src="@drawable/ic_launcher"               app:elevation="4dp" />       </tableRow>       <tableRow           androID:ID="@+ID/tableRow2"           androID:layout_wIDth="wrap_content"           androID:layout_height="wrap_content" >           <button               androID:ID="@+ID/button04"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:text="button" />           <button               androID:ID="@+ID/button03"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:text="button" />           <button               androID:ID="@+ID/button02"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:text="button" />           <button               androID:ID="@+ID/button01"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:text="button" />           <button               androID:ID="@+ID/button1"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:text="button" />       </tableRow>       <tableRow           androID:ID="@+ID/tableRow3"           androID:layout_wIDth="wrap_content"           androID:layout_height="wrap_content" >           <Progressbar               androID:ID="@+ID/progressbar1"                              androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:progress="60" />       </tableRow>       <tableRow           androID:ID="@+ID/tableRow4"           androID:layout_wIDth="wrap_content"           androID:layout_height="wrap_content" >           <EditText               androID:ID="@+ID/editText1"               androID:layout_wIDth="wrap_content"               androID:layout_height="wrap_content"               androID:ems="10"               androID:text="WIDth OK" >               <requestFocus />           </EditText>       </tableRow>   </tableLayout></relativeLayout>
解决方法 关于浮动 *** 作按钮

浮动 *** 作按钮用于提升 *** 作.每个屏幕仅建议使用一个浮动 *** 作按钮来表示最常见的 *** 作.因此,不要在一个原始中使用这么多的动作按钮.请改用普通按钮

总结

以上是内存溢出为你收集整理的android – 在TableLayout中浮动Action Button错误位置全部内容,希望文章能够帮你解决android – 在TableLayout中浮动Action Button错误的位置所遇到的程序开发问题。

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

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

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

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

发表评论

登录后才能评论

评论列表(0条)

    保存