Is there a way to check if the user is using a tablet or a phone? I\'ve got problems with my tilt function and my new tablet (Transformer)
This is the method that i use :
public static boolean isTablet(Context ctx){
return = (ctx.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
Using:
Configuration.SCREENLAYOUT_SIZE_MASK
Configuration.SCREENLAYOUT_SIZE_LARGE
This is the recommended method!