XML里怎么把控件置于屏幕最下。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ViewTitle="http://schemas.android.com/apk/res/com.android.task"
xmlns:XXXX="http://schemas.android.com/apk/res/com.android.task"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
     >   
  <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="aaaaa"
    android:textColor="#FFFFFF"
    android:textSize="10dip"
    android:gravity="bottom"
    ></TextView>
</LinearLayout>请问这样可以吗,啊?是否通过gravity设置,还是通过其他的设置。请指点一下。谢!
    

解决方案 »

  1.   

    可以考虑使用其它布局,比如TableLayout。
      

  2.   

    推荐用viewgroup,可以精确定位各控件位置。xml建议全部放弃,我做的2个游戏都没有用xml配置,xml缺点是死板不灵活,自己定义控件才好。
      

  3.   

    把android:gravity="bottom"
    放到LinearLayout里面就行了!
      

  4.   

    用相对布局,使用android:layout_alignParentBottom这个属性,
      

  5.   

    把LinearLayout中orientation的属性改成android:orientation="horizontal"就可以了,也可以用4L的方法实现