Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.app.Activity;

import android.content.Context;

import android.view.Display;

public class Main {
    public static boolean is_tablet(Context ctx) {
        Display display = ((Activity) ctx).getWindowManager().getDefaultDisplay();
        int width = display.getWidth();
        int height = display.getHeight();

        if ((width > 1000) || (height > 1000))
            return true;
        else
            return false;
    }
}