1
0
Fork 0

Adaptation to smaller screens

This commit is contained in:
Carlos Galindo 2015-02-21 23:05:04 +01:00
parent 84b93fe74d
commit 847f6dceed
2 changed files with 142 additions and 135 deletions

View file

@ -321,22 +321,22 @@ public class MainActivity extends ActionBarActivity
//attacks //attacks
((TextView) findViewById(R.id.FUE)).setText( ((TextView) findViewById(R.id.FUE)).setText(
getString(R.string.FUE) + ": " + player.getFue() getString(R.string.FUE) + ":" + player.getFue()
); );
((TextView) findViewById(R.id.CON)).setText( ((TextView) findViewById(R.id.CON)).setText(
getString(R.string.CON) + ": " + player.getCon() getString(R.string.CON) + ":" + player.getCon()
); );
((TextView) findViewById(R.id.DES)).setText( ((TextView) findViewById(R.id.DES)).setText(
getString(R.string.DES) + ": " + player.getDes() getString(R.string.DES) + ":" + player.getDes()
); );
((TextView) findViewById(R.id.INT)).setText( ((TextView) findViewById(R.id.INT)).setText(
getString(R.string.INT) + ": " + player.getInt() getString(R.string.INT) + ":" + player.getInt()
); );
((TextView) findViewById(R.id.SAB)).setText( ((TextView) findViewById(R.id.SAB)).setText(
getString(R.string.SAB) + ": " + player.getSab() getString(R.string.SAB) + ":" + player.getSab()
); );
((TextView) findViewById(R.id.CAR)).setText( ((TextView) findViewById(R.id.CAR)).setText(
getString(R.string.CAR) + ": " + player.getCar() getString(R.string.CAR) + ":" + player.getCar()
); );
//defenses //defenses

View file

@ -16,76 +16,79 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" /> android:layout_alignParentEnd="true" />
<RelativeLayout <HorizontalScrollView
android:orientation="vertical" android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignBottom="@+id/pgCurrent"
android:layout_toLeftOf="@+id/pgCurrent" android:id="@+id/scroll1">
android:layout_toStartOf="@+id/pgCurrent" <RelativeLayout
android:id="@+id/basicInfoContainer" android:orientation="vertical"
android:layout_alignBottom="@+id/pgCurrent">
<TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/basicInfoContainer">
android:text="@string/adventurer_name"
android:id="@+id/nameText"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/race_name" android:text="@string/adventurer_name"
android:id="@+id/raceText" android:id="@+id/nameText"
android:layout_alignTop="@+id/classText" android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/classText" android:layout_alignParentLeft="true"
android:layout_toEndOf="@+id/classText" android:layout_alignParentStart="true" />
android:layout_marginLeft="10dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/class_name" android:text="@string/race_name"
android:id="@+id/classText" android:id="@+id/raceText"
android:layout_below="@+id/nameText" android:layout_alignTop="@+id/classText"
android:layout_alignParentStart="false" android:layout_toRightOf="@+id/classText"
android:layout_alignParentLeft="true" /> android:layout_toEndOf="@+id/classText"
android:layout_marginLeft="10dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/level" android:text="@string/class_name"
android:id="@+id/lvlText" android:id="@+id/classText"
android:layout_alignParentBottom="false" android:layout_below="@+id/nameText"
android:layout_toRightOf="@+id/raceText" android:layout_alignParentStart="false"
android:layout_toEndOf="@+id/raceText" android:layout_alignParentLeft="true" />
android:layout_alignTop="@+id/raceText"
android:layout_marginLeft="10dp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/level"
android:id="@+id/lvlText"
android:layout_alignParentBottom="false"
android:layout_toRightOf="@+id/raceText"
android:layout_toEndOf="@+id/raceText"
android:layout_alignTop="@+id/raceText"
android:layout_marginLeft="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/lvl"
android:layout_alignParentBottom="false"
android:layout_toRightOf="@+id/lvlText"
android:layout_toEndOf="@+id/lvlText"
android:layout_alignTop="@+id/lvlText"
android:layout_marginLeft="10dp" />
</RelativeLayout>
</HorizontalScrollView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/lvl"
android:layout_alignParentBottom="false"
android:layout_toRightOf="@+id/lvlText"
android:layout_toEndOf="@+id/lvlText"
android:layout_alignTop="@+id/lvlText"
android:layout_marginLeft="10dp" />
</RelativeLayout>
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/basicInfoContainer" android:layout_below="@+id/scroll1"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:id="@+id/curativeEffortsContainer"> android:id="@+id/curativeEffortsContainer">
@ -109,6 +112,7 @@
android:id="@+id/titleAttack" android:id="@+id/titleAttack"
android:text="@string/attack" android:text="@string/attack"
android:textAllCaps="true" android:textAllCaps="true"
android:drawableBottom="?android:attr/listChoiceBackgroundIndicator"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -118,80 +122,83 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingLeft="8dip" android:paddingLeft="8dip"
android:paddingRight="8dip"/> android:paddingRight="8dip"/>
<HorizontalScrollView
<GridLayout android:layout_width="wrap_content"
android:layout_width="fill_parent" android:layout_height="wrap_content">
android:layout_height="wrap_content" <GridLayout
android:id="@+id/attackGrid"
android:columnCount="3"
android:rowCount="2">
<TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:id="@+id/attackGrid"
android:typeface="monospace" android:columnCount="3"
android:ems="4" android:rowCount="2">
android:layout_row="0"
android:layout_column="0"
android:id="@+id/FUE"
android:hint="@string/FUE" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="4"
android:layout_row="1" android:layout_row="0"
android:layout_column="0" android:layout_column="0"
android:id="@+id/CON" android:id="@+id/FUE"
android:hint="@string/CON" /> android:hint="@string/FUE" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="4"
android:layout_row="0" android:layout_row="1"
android:layout_column="1" android:layout_column="0"
android:id="@+id/DES" android:id="@+id/CON"
android:hint="@string/DES" /> android:hint="@string/CON" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="4"
android:layout_row="1" android:layout_row="0"
android:layout_column="1" android:layout_column="1"
android:id="@+id/INT" android:id="@+id/DES"
android:hint="@string/INT" /> android:hint="@string/DES" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="4"
android:layout_row="0" android:layout_row="1"
android:layout_column="2" android:layout_column="1"
android:id="@+id/SAB" android:id="@+id/INT"
android:hint="@string/SAB" /> android:hint="@string/INT" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="4"
android:layout_row="1" android:layout_row="0"
android:layout_column="2" android:layout_column="2"
android:id="@+id/CAR" android:id="@+id/SAB"
android:hint="@string/CAR" /> android:hint="@string/SAB" />
</GridLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace"
android:ems="4"
android:layout_row="1"
android:layout_column="2"
android:id="@+id/CAR"
android:hint="@string/CAR" />
</GridLayout>
</HorizontalScrollView>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -228,7 +235,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="5"
android:layout_row="0" android:layout_row="0"
android:layout_column="0" android:layout_column="0"
android:id="@+id/CA" android:id="@+id/CA"
@ -239,7 +246,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="5"
android:layout_row="0" android:layout_row="0"
android:layout_column="1" android:layout_column="1"
android:id="@+id/FORT" android:id="@+id/FORT"
@ -250,7 +257,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="5"
android:layout_row="1" android:layout_row="1"
android:layout_column="0" android:layout_column="0"
android:id="@+id/REF" android:id="@+id/REF"
@ -261,7 +268,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:typeface="monospace" android:typeface="monospace"
android:ems="4" android:ems="5"
android:layout_row="1" android:layout_row="1"
android:layout_column="1" android:layout_column="1"
android:id="@+id/VOL" android:id="@+id/VOL"