Is device a pad - Android Hardware

Android examples for Hardware:Device Feature

Description

Is device a pad

Demo Code


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

public class Main {

    public static boolean isPad(Context context) {
        return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
    }//from w  w w.j  a va2  s  .  com
}

Related Tutorials