Froyo had troubles with the old table layout. Changed instead to the same layout...
[debian/openrocket] / android / res / layout / tcqueryform.xml
index fe37d805da212eb9e85b1978b22989d4c54ef926..d739334aebaeef3de3a20c6ba63bb0ef0885d8e0 100644 (file)
@@ -2,83 +2,64 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:descendantFocusability="beforeDescendants"
+    android:focusableInTouchMode="true"
+    android:minWidth="250dp"
     android:orientation="vertical" >
 
-    <!-- this is just here so the edittext doesn't get focus -->
-
-    <LinearLayout
-        android:layout_width="0px"
-        android:layout_height="0px"
-        android:focusable="true"
-        android:focusableInTouchMode="true" />
-
-    <TableLayout
-        android:id="@+id/tableLayout1"
-        android:layout_width="fill_parent"
+    <TextView
+        android:id="@+id/textView1"
+        style="@style/labelTextStyle"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-       >
-
-        <TableRow>
-
-            <TextView
-                android:id="@+id/textView1"
-                android:text="@string/motor_manufacturer"
-                android:layout_weight="0" />
+        android:text="@string/motor_manufacturer" />
 
-            <Spinner
-                android:id="@+id/TCMotorSearchFormManufacturerField"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:entries="@array/TCMotorSearchManufacturerList" />
-        </TableRow>
-
-        <TableRow>
-
-            <TextView
-                android:text="@string/motor_impulseclass" 
-                android:layout_weight="0"/>
-
-            <Spinner
-                android:id="@+id/TCMotorSearchFormImpulseField"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:entries="@array/TCMotorSearchImpulseList" />
-        </TableRow>
+    <Spinner
+        android:id="@+id/TCMotorSearchFormManufacturerField"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:entries="@array/TCMotorSearchManufacturerList" />
 
-        <TableRow>
+    <TextView
+        style="@style/labelTextStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/motor_impulseclass" />
 
-            <TextView
-                android:text="@string/motor_commonname" 
-                android:layout_weight="0"/>
+    <Spinner
+        android:id="@+id/TCMotorSearchFormImpulseField"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:entries="@array/TCMotorSearchImpulseList" />
 
-            <EditText
-                android:inputType="text"
-                android:id="@+id/TCMotorSearchFormCommonNameField"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:text="" />
-        </TableRow>
+    <TextView
+        style="@style/labelTextStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/motor_commonname" />
 
-        <TableRow>
+    <EditText
+        android:id="@+id/TCMotorSearchFormCommonNameField"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:inputType="text"
+        android:text="" />
 
-            <TextView
-                android:text="@string/motor_diameter" 
-                android:layout_weight="0"/>
+    <TextView
+        style="@style/labelTextStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/motor_diameter" />
 
-            <Spinner
-                android:id="@+id/TCMotorSearchFormDiameterField"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:entries="@array/TCMotorSearchDiameterList" />
-        </TableRow>
-    </TableLayout>
+    <Spinner
+        android:id="@+id/TCMotorSearchFormDiameterField"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:entries="@array/TCMotorSearchDiameterList" />
 
     <Button
         android:id="@+id/TCMotorSearchFromSubmitButton"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="center_horizontal"
         android:text="@string/TCMotorSearchFormSubmit" />