Created
February 3, 2012 12:57
-
-
Save Amokrane/1730048 to your computer and use it in GitHub Desktop.
The parallel activity pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static boolean shinyNewAPIS = android.os.Build.VERSION_SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Intent startActivityIntent = null; | |
if(!shinyNewAPIS) { | |
startActivityIntent = new Intent(this, legacyActivity.class); | |
} else { | |
startActivityIntent = new Intent(this, icsActivity.class); | |
} | |
startActivity(startActivityIntent); | |
finish(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment