]> git.gag.com Git - debian/openrocket/commitdiff
Added helper function to correctly implement goHome action. Uses FLAG_ACTIVITY_CLEAR...
authorkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Thu, 23 Feb 2012 17:38:17 +0000 (17:38 +0000)
committerkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Thu, 23 Feb 2012 17:38:17 +0000 (17:38 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@439 180e2498-e6e9-4542-8430-84ac67f01cd8

android/src/net/sf/openrocket/android/ActivityHelpers.java

index b2b573823eef904faef3e7f4756c08048d6f0eee..785852b5debdd1eb46962e24d2358e764e125b41 100644 (file)
@@ -7,6 +7,11 @@ import android.content.Intent;
 \r
 public abstract class ActivityHelpers {\r
 \r
+       public static void goHome( Activity parent ) {\r
+               Intent i = new Intent(parent, Main.class);\r
+               i.addFlags( Intent.FLAG_ACTIVITY_CLEAR_TOP);\r
+               parent.startActivity(i);\r
+       }\r
        \r
        public static void browseMotors( Activity parent ) {\r
                Intent i = new Intent(parent, MotorBrowserActivity.class);\r