- TableRow를 이용해서 화면을 table형식으로 배치 할 수 있다.
- 이 예제를 통해 화면배치를 해보도록 하자.
-xml 소스
</TableLayout>
-실행 화면
- 이 예제를 통해 화면배치를 해보도록 하자.
-xml 소스
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="국어 " />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="영어 " />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="수학" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="88 " />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="92 " />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="76" />
</TableRow>
-실행 화면
'JAVA > Android' 카테고리의 다른 글
안드로이드 (이미지)Button 눌렸을때 변화 일으키기 예제 따라하기 (0) | 2012.02.03 |
---|---|
안드로이드 onBackPressed() 종료 확인 메세지 예제 따라하기 (3) | 2012.02.02 |
안드로이드 MediaPlayer 간단한 예제 (0) | 2012.01.31 |
안드로이드 ProgressDialog 예제 따라하기 (0) | 2012.01.30 |
안드로이드 알람(Alarm,Notification) 예제 따라하기 (1) | 2012.01.27 |