본문 바로가기

개발도구/aOS - 안드로이드 개발

RelativeLayout


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >
<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="10pt"
    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_marginRight="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="10pt"
    android:text="춘향"
    />
</RelativeLayout>

'개발도구 > aOS - 안드로이드 개발' 카테고리의 다른 글

Layout 고급  (0) 2011.05.17
AbsoulteLayout  (0) 2011.05.17
TableLayout  (0) 2011.05.17
Android intent get 값 받아 오기  (0) 2011.05.16
Android Log 문자, 숫자 찍어보기!  (0) 2011.05.16