Explicitly allow the dialog to be dismissed with touching outside.
authorkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Thu, 19 Jul 2012 14:40:57 +0000 (14:40 +0000)
committerkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Thu, 19 Jul 2012 14:40:57 +0000 (14:40 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@909 180e2498-e6e9-4542-8430-84ac67f01cd8

android/src/net/sf/openrocket/android/motor/MotorListDialogFragment.java

index fcacba11841889c1fa9feaf32c5cbe7b06017ac7..680e5775da6907ea4095db79d836e4b4dc584153 100644 (file)
@@ -10,13 +10,14 @@ import android.app.Dialog;
 import android.content.Context;\r
 import android.database.Cursor;\r
 import android.os.Bundle;\r
-import android.support.v4.app.DialogFragment;\r
 import android.view.View;\r
 import android.widget.ExpandableListView;\r
 import android.widget.ResourceCursorTreeAdapter;\r
 import android.widget.TextView;\r
 \r
-public class MotorListDialogFragment extends DialogFragment \r
+import com.actionbarsherlock.app.SherlockDialogFragment;\r
+\r
+public class MotorListDialogFragment extends SherlockDialogFragment \r
 implements ExpandableListView.OnChildClickListener\r
 {\r
 \r
@@ -77,7 +78,9 @@ implements ExpandableListView.OnChildClickListener
                        builder.setTitle("No Motors Found");\r
                        builder.setMessage("Motors can be downloaded from thrustcurve");\r
                        builder.setCancelable(true);\r
-                       builder.create().show();\r
+                       AlertDialog dialog = builder.create();\r
+                       dialog.setCanceledOnTouchOutside(true);\r
+                       dialog.show();\r
                }\r
 \r
                Cursor motorCursor = mDbHelper.getMotorDao().fetchGroups(groupColumn);\r