Project name : Sudoku
Package name : org.example.sudoku
Activity : Sudoku
Application name : Sudoku

More...
XML でユーザインタフェースを設定しているのが
res/layout/main.xml
これを書き換えれば OK
Sudoku/res/layout/main.xml
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/main_title"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/new_game_label"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/about_label"
/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/exit_label"
/>

もう少しカスタマイズ
Sudoku/res/layout/main.xml
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="30dip"
>android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
>android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/main_title"
android:layout_gravity="center"
android:layout_marginBottom="25dip"
android:textSize="24.5sp"
/>
android:id="@+id/continue_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label"
/>
android:id="@+id/new_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/new_game_label"
/>
android:id="@+id/about_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/about_label"
/>
android:id="@+id/exit_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/exit_label"
/>
Sudoku/res/values/colors.xml
#3500ffff

横長モードだとはみ出してしまう
ちなみにエミュレータで横長モードにするには Ctrl + F11

ので、横長用のレイアウトを作る
Sudoku/res/layout-land/main.xml
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:padding="15dip"
android:orientation="horizontal"
>android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="center"
android:paddingLeft="20dip"
android:paddingRight="20dip"
>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"
/>android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:stretchColumns="*"
>
android:id="@+id/continue_button"
android:text="@string/continue_label"
/>
android:id="@+id/new_button"
android:text="@string/new_game_label"
/>
android:id="@+id/about_button"
android:text="@string/about_label"
/>
android:id="@+id/exit_button"
android:text="@string/exit_label"
/>
直った

0 件のコメント:
コメントを投稿