Java tutorial
//package com.java2s; import android.view.KeyEvent; public class Main { private static final int FLAG_LONG_PRESS = 0x00000080; public static boolean isLongPress(KeyEvent event) { return (event.getFlags() & FLAG_LONG_PRESS) != 0; } }