Added helper function to correctly implement goHome action. Uses FLAG_ACTIVITY_CLEAR_TOP to remove all activities in between.

This commit is contained in:
Kevin Ruland 2012-02-23 17:38:17 +00:00
parent 6c4e3c6bcd
commit 466cd66461

View File

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