您的位置:首页 > 移动开发 > Android开发

Android开发之相对布局管理器Relat…

2013-12-30 20:37 330 查看




 
  <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"
   
tools:context=".MainActivity" >

   
<TextView
   
   
android:id="@+id/txt1"
   
   
android:layout_width="wrap_content"
   
   
android:layout_height="wrap_content"
   
    android:text="相对布局"
/>
 
  
   
<ImageView 
   
   
android:id="@+id/img1"
   
   
android:layout_width="wrap_content"
   
   
android:layout_height="wrap_content"
   
   
android:src="@drawable/ic_launcher"
   
   
android:layout_toRightOf="@id/txt1"/>
 
  
   
<ImageView 
   
   
android:id="@+id/img2"
   
   
android:layout_width="wrap_content"
   
   
android:layout_height="wrap_content"
   
   
android:src="@drawable/touxiang"
   
   
android:layout_below="@id/img1"/>
<TextView
   
   
android:id="@+id/txt2"
   
   
android:layout_width="wrap_content"
   
   
android:layout_height="wrap_content"
   
   
android:text="相对布局管理器" 
   
   
android:layout_below="@id/img2"/>
</RelativeLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: