Froyo had troubles with the old table layout. Changed instead to the same layout...
authorkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Thu, 19 Jul 2012 14:44:39 +0000 (14:44 +0000)
committerkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Thu, 19 Jul 2012 14:44:39 +0000 (14:44 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@911 180e2498-e6e9-4542-8430-84ac67f01cd8

android/res/layout/tcqueryform.xml
android/res/values/strings.xml
android/src/net/sf/openrocket/android/thrustcurve/TCQueryActivity.java

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" />
index 83ae8e294141eb38008207dc6749a9047cb75c69..485359c8c5fc6a4551d5440fc9540014a15884e8 100644 (file)
@@ -30,6 +30,7 @@
     </string-array>\r
 \r
     <string name="TCMotorSearchFormSubmit">Submit</string>\r
+    <string name="TCMotorSearchFormTitle">Thrustcurve.org Search Criteria</string>\r
     <string name="overviewConfigurationSpinnerPrompt">Select Configuration</string>\r
     <string name="simulationSeries1Label">Series 1</string>\r
     <string name="simulationSeries2Label">Series 2</string>\r
index c27c7744a28eeec796330e70919adb169931a325..9bb4e2dcc70df7a7e511c5384d68c2a9f38cef46 100644 (file)
@@ -4,19 +4,21 @@ import net.sf.openrocket.R;
 import net.sf.openrocket.android.util.AndroidLogWrapper;\r
 import net.sf.openrocket.android.util.ErrorDialogFragment;\r
 import android.os.Bundle;\r
-import android.support.v4.app.FragmentActivity;\r
 import android.view.View;\r
 import android.widget.Button;\r
 import android.widget.EditText;\r
 import android.widget.Spinner;\r
 \r
-public class TCQueryActivity extends FragmentActivity\r
+import com.actionbarsherlock.app.SherlockFragmentActivity;\r
+\r
+public class TCQueryActivity extends SherlockFragmentActivity\r
 implements TCQueryAction.OnTCQueryCompleteListener\r
 {\r
 \r
        @Override\r
        protected void onCreate(Bundle savedInstanceState) {\r
                super.onCreate(savedInstanceState);\r
+               setTitle(R.string.TCMotorSearchFormTitle);\r
                setContentView(R.layout.tcqueryform);\r
 \r
                final Spinner manufacturerField = (Spinner) findViewById(R.id.TCMotorSearchFormManufacturerField);\r