cosmetic tweak in the teamselection menu hedgeroid
authorXeli
Sun, 21 Aug 2011 19:57:23 +0200
branchhedgeroid
changeset 5633 443b7c6543e5
parent 5630 a5a338628633
child 5635 0c17c8791ac9
cosmetic tweak in the teamselection menu
project_files/Android-build/SDL-android-project/res/layout/team_selection_entry.xml
project_files/Android-build/SDL-android-project/res/layout/team_selection_entry_simple.xml
project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/TeamSelectionActivity.java
--- a/project_files/Android-build/SDL-android-project/res/layout/team_selection_entry.xml	Sun Aug 21 19:57:06 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/res/layout/team_selection_entry.xml	Sun Aug 21 19:57:23 2011 +0200
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
+  android:id="@+id/teamColor"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:background="#8FFF"
@@ -13,20 +14,19 @@
   	android:adjustViewBounds="true"
   	android:scaleType="centerInside"/>
   <ImageView
-  	android:id="@+id/teamColor"
+  	
   	android:layout_height="wrap_content"
   	android:layout_width="wrap_content"
   	android:layout_alignParentRight="true"
   	android:layout_centerVertical="true"
   	android:adjustViewBounds="true"
   	android:scaleType="centerInside"
-  	android:src="@drawable/box"
   	android:background="#FDA"/>
   <ImageView
   	android:id="@+id/teamCount"
   	android:layout_height="fill_parent"
   	android:layout_width="wrap_content"
-  	android:layout_toLeftOf="@id/teamColor"
+  	android:layout_alignParentRight="true"
   	android:layout_alignTop="@id/imgDifficulty"
   	android:layout_alignBottom="@id/imgDifficulty"
   	android:adjustViewBounds="true"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/res/layout/team_selection_entry_simple.xml	Sun Aug 21 19:57:23 2011 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="fill_parent"
+  android:layout_height="fill_parent"
+  android:background="#8FFF"
+  android:padding="3dip">
+  
+  <ImageView
+  	android:id="@+id/imgDifficulty"
+  	android:layout_height="fill_parent"
+  	android:layout_width="wrap_content"
+  	android:adjustViewBounds="true"
+  	android:scaleType="centerInside"/>
+ 
+  <TextView
+  	android:id="@+id/txtName"
+  	android:layout_height="fill_parent"
+  	android:layout_width="wrap_content"
+  	android:layout_toRightOf="@id/imgDifficulty"
+  	android:layout_toLeftOf="@id/teamCount"
+  	android:layout_alignTop="@id/imgDifficulty"
+  	android:layout_alignBottom="@id/imgDifficulty"
+  	android:gravity="center"
+  	android:textColor="#FFF"/>
+</RelativeLayout>
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/TeamSelectionActivity.java	Sun Aug 21 19:57:06 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/TeamSelectionActivity.java	Sun Aug 21 19:57:23 2011 +0200
@@ -68,7 +68,7 @@
 
 		availableTeams = (ListView) findViewById(R.id.availableTeams);
 		availableTeamsList = FrontendDataUtils.getTeams(this);
-		SimpleAdapter adapter = new SimpleAdapter(this, availableTeamsList, R.layout.team_selection_entry, new String[]{"txt", "img"}, new int[]{R.id.txtName, R.id.imgDifficulty});
+		SimpleAdapter adapter = new SimpleAdapter(this, availableTeamsList, R.layout.team_selection_entry_simple, new String[]{"txt", "img"}, new int[]{R.id.txtName, R.id.imgDifficulty});
 		availableTeams.setAdapter(adapter);
 		registerForContextMenu(availableTeams);
 		availableTeams.setOnItemClickListener(availableClicker);