is Touch Screen - Android android.app

Android examples for android.app:Screen

Description

is Touch Screen

Demo Code

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  w  w w .  j  a va  2 s  .  c  om*/
      return true;
    }
  }

}

Related Tutorials