Added helper function to correctly implement goHome action. Uses FLAG_ACTIVITY_CLEAR_TOP to remove all activities in between.
This commit is contained in:
parent
6c4e3c6bcd
commit
466cd66461
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user