现在的位置: 首页 > 综合 > 正文

解决布局中组件不能放在底部的问题

2018年05月19日 ⁄ 综合 ⁄ 共 465字 ⁄ 字号 评论关闭

布局中有时设置了 

  1. android:layout_alignParentBottom="true"   

也不一定能把组件放在屏幕的底部,那这时候可以把这个组件放在一个布局中:

  1. <LinearLayout  
  2.      android:id="@+id/act_rest_bar"  
  3.      android:layout_width="match_parent"  
  4.      android:layout_height="wrap_content"  
  5.      android:layout_alignParentBottom="true" >  
  6.   
  7.      <include layout="@layout/widget_bottom_bar" />  
  8.  </LinearLayout>  


这样就可以了。

原文出自http://blog.csdn.net/yueqinglkong/article/details/12322631

抱歉!评论已关闭.