Android Touch Screen Check isTouchScreen(Context context)

Here you can find the source of isTouchScreen(Context context)

Description

is Touch Screen

Declaration

public static boolean isTouchScreen(Context context) 

Method Source Code

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

public class Main {
    public static boolean isTouchScreen(Context context) {
        int touchscreen = context.getResources().getConfiguration().touchscreen;
        switch (touchscreen) {
        case Configuration.TOUCHSCREEN_NOTOUCH:
            return false;
        default://from ww w  . ja v  a  2s . c  om
            return true;
        }
    }
}