Programming/Android2010. 7. 5. 21:37


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<Button
android:id="@+id/btnpage1"  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Page 1"
/>
<Button
android:id="@+id/btnpage2"  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Page 2"
/>
<Button
android:id="@+id/btnpage3"  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Page 3"
/>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:id="@+id/page1"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffff00"
>
<TextView  
android:layout_width="match_parent" 
android:layout_height="wrap_content"
android:textColor="#000000" 
android:text="첫 번째 페이지"
/>
<ImageView  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:src="@drawable/pride"
/>
</LinearLayout>
<RelativeLayout
android:id="@+id/page2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:background="#00ff00"
>
<EditText
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:layout_alignParentRight="true" 
android:text="두번째 페이지"
/>
<Button
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" 
android:text="Button"
/>
</RelativeLayout>
<TableLayout
android:id="@+id/page3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
android:background="#0000ff"
>
<TableRow>
<TextView android:text="국어" android:textSize="15pt" android:padding="10px" />
<TextView android:text="영어" android:textSize="15pt" android:padding="10px" />
<TextView android:text="수학" android:textSize="15pt" android:padding="10px" />
</TableRow>
<TableRow>
<TextView android:text="88" android:textSize="15pt" android:padding="10px" />
<TextView android:text="92" android:textSize="15pt" android:padding="10px" />
<TextView android:text="76" android:textSize="15pt" android:padding="10px" />
</TableRow>
</TableLayout>
</FrameLayout>
</LinearLayout>


참고서 - 안드로이드 프로그래밍 정복

'Programming > Android' 카테고리의 다른 글

리스너  (0) 2010.08.02
Memo  (0) 2010.08.02
PaintTest  (3) 2010.07.09
Posted by zzibong