Java tutorial
//package com.java2s; //License from project: Apache License import android.content.res.Configuration; public class Main { private static boolean isEnoughSpace(Configuration configuration) { if (configuration == null) { return false; } if (configuration.orientation == Configuration.ORIENTATION_PORTRAIT) { return true; } int sizeMask = configuration.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK; boolean smallScreen = sizeMask == Configuration.SCREENLAYOUT_SIZE_SMALL || sizeMask == Configuration.SCREENLAYOUT_SIZE_NORMAL; return !smallScreen; } }