mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
First test at enhancing the start screen UI.
This commit is contained in:
BIN
AndorsTrail/res/drawable/sky_bottom.png
Normal file
BIN
AndorsTrail/res/drawable/sky_bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 B |
BIN
AndorsTrail/res/drawable/sky_gradient.png
Normal file
BIN
AndorsTrail/res/drawable/sky_gradient.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 361 B |
7
AndorsTrail/res/drawable/sky_gradient_drawable.xml
Normal file
7
AndorsTrail/res/drawable/sky_gradient_drawable.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tileMode="repeat"
|
||||
android:src="@drawable/sky_gradient"
|
||||
android:antialias="false"
|
||||
android:dither="false"
|
||||
/>
|
||||
BIN
AndorsTrail/res/drawable/sky_top.png
Normal file
BIN
AndorsTrail/res/drawable/sky_top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 197 B |
BIN
AndorsTrail/res/drawable/title_logo.png
Normal file
BIN
AndorsTrail/res/drawable/title_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
121
AndorsTrail/res/layout-land/startscreen.xml
Normal file
121
AndorsTrail/res/layout-land/startscreen.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
layout="@layout/title_bg_layout" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<!-- android:background="@layout/title_bg_layout" -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/startcreen_centerarea"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical" >
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startscreen_dev_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#FFFFFFFF"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="#880000"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startscreen_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="top|right"
|
||||
android:gravity="top|right"
|
||||
android:text="@android:string/unknownName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startscreen_currenthero"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#BB1212FF"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@android:string/unknownName" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/startscreen_enterheroname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_continue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startscreen_continue" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_newgame"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/startscreen_newgame" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_load"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/startscreen_load" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_preferences"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/menu_settings" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_about"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/startscreen_about" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
61
AndorsTrail/res/layout-land/title_bg_layout.xml
Normal file
61
AndorsTrail/res/layout-land/title_bg_layout.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include layout="@layout/title_bg_sky_layout"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_above"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0" >
|
||||
</TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.4"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.2" >
|
||||
</TextView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_logo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="20sp"
|
||||
android:layout_marginRight="20sp"
|
||||
android:layout_marginTop="20sp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/title_logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_right"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.6" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_below"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.6" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,114 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@drawable/ui_startbackground"
|
||||
>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
>
|
||||
<ImageView
|
||||
<include layout="@layout/title_bg_layout" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<!-- android:background="@layout/title_bg_layout" -->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/startcreen_centerarea"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/andors_trail_logo"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/startscreen_currenthero"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@android:string/unknownName"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/startscreen_enterheroname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:inputType="textPersonName"
|
||||
/>
|
||||
-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startscreen_dev_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textColor="#880000"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/startscreen_dev_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#FFFFFFFF"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="#880000"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/startscreen_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="@android:string/unknownName" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startscreen_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@android:string/unknownName"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/startscreen_currenthero"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#BB1212FF"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@android:string/unknownName" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_continue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startscreen_continue"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/startscreen_enterheroname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/startscreen_newgame"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startscreen_newgame"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/startscreen_load"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startscreen_load"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/startscreen_continue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startscreen_continue" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/startscreen_preferences"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_settings"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/startscreen_about"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/startscreen_about"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_newgame"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/startscreen_newgame" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_load"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/startscreen_load" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_preferences"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/menu_settings" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_about"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/startscreen_about" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
61
AndorsTrail/res/layout/title_bg_layout.xml
Normal file
61
AndorsTrail/res/layout/title_bg_layout.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include layout="@layout/title_bg_sky_layout"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_above"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0" >
|
||||
</TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.4"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_left"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2" >
|
||||
</TextView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_logo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20sp"
|
||||
android:layout_marginRight="20sp"
|
||||
android:layout_marginTop="20sp"
|
||||
android:layout_weight="0.6"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/title_logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_right"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_logo_placeholder_below"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.6" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
31
AndorsTrail/res/layout/title_bg_sky_layout.xml
Normal file
31
AndorsTrail/res/layout/title_bg_sky_layout.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_bg_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.4"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/sky_top" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_bg_centerpattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/sky_gradient_drawable" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_bg_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.6"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/sky_bottom" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -14,7 +14,12 @@ import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import com.gpl.rpg.AndorsTrail.*;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
|
||||
import com.gpl.rpg.AndorsTrail.Dialogs;
|
||||
import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.WorldSetup;
|
||||
import com.gpl.rpg.AndorsTrail.controller.Constants;
|
||||
import com.gpl.rpg.AndorsTrail.resource.tiles.TileManager;
|
||||
import com.gpl.rpg.AndorsTrail.savegames.Savegames;
|
||||
@@ -96,7 +101,8 @@ public final class StartScreenActivity extends Activity {
|
||||
Dialogs.showLoad(StartScreenActivity.this);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
TextView development_version = (TextView) findViewById(R.id.startscreen_dev_version);
|
||||
if (AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAMES) {
|
||||
development_version.setText(R.string.startscreen_incompatible_savegames);
|
||||
|
||||
Reference in New Issue
Block a user