commonlib/src/main/java/com/blankj/utilcode/util/ScreenUtils.java
public static boolean isTablet() {
        return (Utils.getContext().getResources().getConfiguration().screenLayout 
                & Configuration.SCREENLAYOUT_SIZE_MASK)
                >= Configuration.SCREENLAYOUT_SIZE_LARGE;
    }
/**
     * Check if the device is a tablet based on screen size
     *
     * @return {@code true}: Yes<br>{@code false}: No
     */
Check if the device is a tablet based on screen size
@return  true: Yes false: No
Check if the device is a tablet based on screen size @return true : Yes false : No
public static boolean isTablet() {
        return (Utils.getContext().getResources().getConfiguration().screenLayout 
                & Configuration.SCREENLAYOUT_SIZE_MASK)
                >= Configuration.SCREENLAYOUT_SIZE_LARGE;
    }
public static boolean isTablet ( ) { return ( Utils . getContext ( ) . getResources ( ) . getConfiguration ( ) . screenLayout & Configuration . SCREENLAYOUT_SIZE_MASK ) >= Configuration . SCREENLAYOUT_SIZE_LARGE ; }
Check if the device is a tablet based on screen size
 @return {@code true}: Yes<br>{@code false}: No
Check if the device is a tablet based on screen size @return { @code true } : Yes<br > { @code false } : No