相对布局中只有两个控件,一个居中View1,另外一个要在View1的左边的方法

            android:id="@+id/top"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_marginBottom="3dp"
        android:background="@color/hui" >

                    android:id="@+id/titlePrint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="@string/wenbo"
            android:textColor="@color/white" />

                    android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginRight="10dp"
            android:layout_toLeftOf="@+id/titlePrint" >

                            android:id="@+id/loadingBar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/loadingpage_bg"
                android:indeterminateDrawable="@drawable/animdraw"
                android:indeterminateDuration="1500"
                android:scaleType="fitCenter" />
       

你可能感兴趣的:(android)