Android Sudoku – 4

Using Alternate Resources

Create the new file in res/layout-land/main.xml with following codes.

<?xml version=”1.0″ encoding=”utf-8″?>

<LinearLayout
xmlns:android=”http://schemas.android.com/apk/res/android&#8221;
android:background=”@color/background”
android:layout_height=”fill_parent”
android:layout_width=”fill_parent”
android:padding=”15dip”
android:orientation=”horizontal” >
<LinearLayout
android:orientation=”vertical”
android:layout_height=”wrap_content”
android:layout_width=”fill_parent”
android:layout_gravity=”center”
android:paddingLeft=”20dip”
android:paddingRight=”20dip” >
<TextView
android:text=”@string/main_title”
android:layout_height=”wrap_content”
android:layout_width=”wrap_content”
android:layout_gravity=”center”
android:layout_marginBottom=”20dip”
android:textSize=”24.5sp” />
<TableLayout
android:layout_height=”wrap_content”
android:layout_width=”wrap_content”
android:layout_gravity=”center”
android:stretchColumns=”*” >
<TableRow>
<Button
android:id=”@+id/continue_button”
android:text=”@string/continue_label” />
<Button
android:id=”@+id/new_button”
android:text=”@string/new_game_label” />
</TableRow>
<TableRow>
<Button
android:id=”@+id/about_button”
android:text=”@string/about_label” />
<Button
android:id=”@+id/exit_button”
android:text=”@string/exit_label” />
</TableRow>
</TableLayout>
</LinearLayout>
</LinearLayout>

This will give the following Output….

 

Leave a comment