Cara Menggunakan Tabel Layout di Eclipse
Program Pada Layout Activity_Main.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1">
<TableRow
android:background="#22ff">
<TextView
android:layout_column="1"
android:text="@string/open"
android:padding="3dip"
/>
<TextView
android:text="@string/ctrl"
android:gravity="right"
android:padding="3dip"
/>
</TableRow>
<TableRow android:background="#22ff">
<TextView
android:layout_column="1"
android:text="@string/save"
android:padding="3dip"
/>
<TextView
android:text="@string/ctrls"
android:gravity="right"
android:padding="3dip"
/>
</TableRow>
<TableRow android:background="#22ff">
<TextView
android:layout_column="1"
android:text="@string/saveas"
android:padding="3dip"
/>
<TextView
android:text="@string/cs"
android:gravity="right"
android:padding="3dip"
/>
</TableRow>
<View
android:layout_height="2dip"
android:background="#FF909090"
/>
<TableRow android:background="#ffff00">
<TextView
android:text="@string/X"
android:padding="3dip"
/>
<TextView
android:text="@string/im"
android:padding="3dip"
/>
</TableRow>
<TableRow android:background="#ffff00">
<TextView
android:text="@string/X"
android:padding="3dip"
/>
<TextView
android:text="@string/ex"
android:padding="3dip"
/>
<TextView
android:text="@string/cte"
android:gravity="right"
android:padding="3dip"
/>
</TableRow>
<View
android:layout_height="2dip"
android:background="#FF909090"
/>
<TableRow android:background="#aaf">
<TextView
android:layout_column="1"
android:text="@string/q"
android:padding="3dip"
/>
</TableRow>
</TableLayout>
String
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Tabel2</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="open">Open…</string>
<string name="ctrl">Ctrl-O…</string>
<string name="save">Save…</string>
<string name="ctrls">Ctrl-S…</string>
<string name="saveas">Save US…</string>
<string name="cs">Ctrl-Shift-S…</string>
<string name="X">X</string>
<string name="im">Import…</string>
<string name="ex">Export…</string>
<string name="cte">Ctrl-E…</string>
<string name="q">Quit</string>
</resources>
Download Aplikasi Tutorial Android lainnya di bawah ini :
Via Google Drive |
0 Response to "Cara Menggunakan Tabel Layout di Eclipse"
Post a Comment