is Tablet - Android Hardware

Android examples for Hardware:Tablet

Description

is Tablet

Demo Code


//package com.java2s;
import android.content.Context;
import android.content.res.Configuration;

public class Main {
    public static boolean isTablet(Context context) {
        return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
    }/* ww  w .jav  a  2 s .  co m*/
}

Related Tutorials