Android examples for android.content:Context
is Tablet
import android.content.Context; import android.content.res.Configuration; public class Main { public static boolean isTablet(Context context) { int screenLayout = context.getResources().getConfiguration().screenLayout; return (screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE; }/*ww w .jav a 2 s . c o m*/ }