Skip to content

Instantly share code, notes, and snippets.

@DavyLin
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavyLin/564a5e992093b54604be to your computer and use it in GitHub Desktop.
Save DavyLin/564a5e992093b54604be to your computer and use it in GitHub Desktop.
choiceADKVersion
class MethodInLowSdk{
public static void aMethod();
};
class MethodInHighSdk{
public static void aMethod();
}
void CallAMethodByVersion(){
if(android.os.Build.VERSION.SDK_INT > low_sdk){
MethodInHighSdk.aMethod();
}else{
MethodInLowSdk.aMethod();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment