我想把注册商标的文字放在布局的最下面,可是不知道为什么显示在最上面了。
哪位能帮我看看吗?谢谢!
<?xml version="1.0" encoding="utf-8"?>
<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:paddingLeft="0dip"
    android:paddingRight="0dip"
    android:paddingTop="0dip"
    android:paddingBottom="0dip"
    android:background="#FFFFFF"
    tools:context=".MainActivity"
    android:screenOrientation="sensor">    <LinearLayout
        android:id="@+id/LinearLayoutAppInit"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:layout_marginLeft="0dp"
        android:layout_marginTop="0dp"
        android:layout_alignParentBottom="true"
        android:orientation="vertical"
        android:visibility="visible"
        android:background="#ddffCCCC"
        >        <TextView
            android:id="@+id/ui_Copyright_TextView"
            android:layout_width="match_parent"
            android:layout_height="20dp"
            android:layout_alignParentBottom="true"
            android:text="注册商标"
            android:textAlignment="center"
            android:textColor="#ffD3D3D3"
            android:textSize="12sp"
            android:textStyle="bold" />    </LinearLayout>
</RelativeLayout>
非常感谢!

解决方案 »

  1.   

    android:layout_alignParentBottom="true"只是相对布局才能用吧,直接改为相对布局
      

  2.   

    把LinearLayout删了就行了,先沉下心来好好学一下基础知识
      

  3.   

    谢谢!我试试!
    我想把几个控件放在一个组里,用代码同时控制这个组是显示还是隐藏。
    我完全不会安卓和java,现在只是尽快把安卓APP弄出来,基本一个问题一个问题学习决
      

  4.   

    gravity="bottom"
      

  5.   

    <?xml version="1.0" encoding="utf-8"?>
    <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:paddingLeft="0dip"
        android:paddingRight="0dip"
        android:paddingTop="0dip"
        android:paddingBottom="0dip"
        android:background="#FFFFFF"
        tools:context=".MainActivity"
        android:screenOrientation="sensor">    <LinearLayout
            android:id="@+id/LinearLayoutAppInit"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:layout_marginLeft="0dp"
            android:layout_marginTop="0dp"
            android:layout_alignParentBottom="true"
            android:orientation="vertical"
            android:visibility="visible"
            android:background="#ddffCCCC"
            android:gravity="bottom">        <TextView
                android:id="@+id/ui_Copyright_TextView"
                android:layout_width="match_parent"
                android:layout_height="20dp"
                android:text="注册商标"
                android:textAlignment="center"
                android:textColor="#ffD3D3D3"
                android:textSize="12sp"
                android:textStyle="bold" />    </LinearLayout>
    </RelativeLayout>
      

  6.   

    android:layout_alignParentBottom="true" ->  android:gravity="bottom"
    或者是把外层LinearLayout干掉