Two new fragments added to the main activity. One of which is the puzzle list on view grid.
This commit is contained in:
8
res/layout/main_activity.xml
Normal file
8
res/layout/main_activity.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fragment_container"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</LinearLayout>
|
||||
|
||||
61
res/layout/main_fragment.xml
Normal file
61
res/layout/main_fragment.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/splash"
|
||||
android:gravity="center_vertical">
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center" />
|
||||
<Button
|
||||
android:id="@+id/btn_start"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_menu_btn_vmargin"
|
||||
android:layout_marginBottom="@dimen/main_menu_btn_vmargin"
|
||||
android:layout_marginLeft="@dimen/main_menu_btn_hmargin"
|
||||
android:layout_marginRight="@dimen/main_menu_btn_hmargin"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:padding="@dimen/main_menu_btn_padding"
|
||||
android:background="@color/main_menu_btn_bg"
|
||||
android:textColor="@color/main_menu_btn_text"
|
||||
android:textSize="@dimen/main_menu_text_size"
|
||||
android:text="@string/btn_start_continue"
|
||||
android:onClick="onStartCurrentPuzzle" />
|
||||
<Button
|
||||
android:id="@+id/btn_puzzles"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_menu_btn_vmargin"
|
||||
android:layout_marginBottom="@dimen/main_menu_btn_vmargin"
|
||||
android:layout_marginLeft="@dimen/main_menu_btn_hmargin"
|
||||
android:layout_marginRight="@dimen/main_menu_btn_hmargin"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:padding="@dimen/main_menu_btn_padding"
|
||||
android:background="@color/main_menu_btn_bg"
|
||||
android:textColor="@color/main_menu_btn_text"
|
||||
android:textSize="@dimen/main_menu_text_size"
|
||||
android:text="@string/btn_puzzles"
|
||||
android:onClick="onPuzzleListShow" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center" />
|
||||
<TextView
|
||||
android:id="@+id/footer_txt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/git_version"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="0"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<GridView
|
||||
android:id="@+id/puzzle_grid"
|
||||
android:layout_width="match_parent"
|
||||
@@ -14,14 +13,5 @@
|
||||
android:numColumns="auto_fit"
|
||||
android:stretchMode="columnWidth"
|
||||
android:gravity="center" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_start"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="onStartCurrentPuzzle"
|
||||
android:text="Start" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user