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

来源:互联网 发布:1024最新地址知乎 编辑:程序博客网 时间:2024/06/10 06:01

布局中有时设置了 

[java] view plaincopyprint?
  1. android:layout_alignParentBottom="true"   
也不一定能把组件放在屏幕的底部,那这时候可以把这个组件放在一个布局中:

[html] view plaincopyprint?
  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

0 0
原创粉丝点击