android中如何在等分LinearLayout

来源:互联网 发布:java集合框架 书籍 编辑:程序博客网 时间:2024/05/15 01:36

xml

  1. <LinearLayout   
  2.       android:orientation="horizontal"  
  3.       android:layout_width="fill_parent"  
  4.       android:layout_height="fill_parent"  
  5.       android:layout_weight="1">    
  6. </LinearLayout>
java

       final LinearLayout.LayoutParams lpWW = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT,1.0f);

   

0 0