본문 바로가기

Android

RelativeLayout

<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:paddingBottom="@dimen/activity_vertical_margin"

    android:paddingLeft="@dimen/activity_horizontal_margin"

    android:paddingRight="@dimen/activity_horizontal_margin"

    android:paddingTop="@dimen/activity_vertical_margin"

    tools:context=".MainActivity" >

 

    <TextView

        android:id="@+id/chulsoo"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginRight="20px"

        android:textSize="15pt"

        android:text="철수" />

      <TextView

        android:id="@+id/younghee"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_toRightOf="@id/chulsoo"

        android:textSize="15pt"

        android:text="영희" />

        <TextView

        android:id="@+id/mongryong"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_below="@id/younghee"

        android:layout_alignParentRight="true"

        android:layout_marginLeft="10px"

        android:textSize="15pt"

        android:text="몽룡" />

         <TextView

        android:id="@+id/chunhyang"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_toLeftOf="@id/mongryong"

        android:layout_alignBottom="@id/mongryong"

        android:textSize="15pt"

        android:text="춘향" />  

 

</RelativeLayout>




'Android' 카테고리의 다른 글

테이블 레이아웃 (Table Layout)  (0) 2013.03.27
프레임레이아웃(FrameLayout)  (0) 2013.03.27
리니어 레이아웃 - 베이스정렬(baselineAligned)  (0) 2013.03.26
버튼과 에디트  (0) 2013.03.26
이미지뷰(imageView) 실습  (0) 2013.03.26