Checks whether the given Key event is an ACTION_UP event. - Android User Interface

Android examples for User Interface:Key Event

Description

Checks whether the given Key event is an ACTION_UP event.

Demo Code

// Copyright 2012 The Chromium Authors. All rights reserved.
//package com.java2s;
import android.view.KeyEvent;

public class Main {
    /**/*www .  jav  a  2s  . c  om*/
     * Checks whether the given event is an ACTION_UP event.
     * @param event Event to be checked.
     * @return Whether the event is an ACTION_UP event.
     */
    public static boolean isActionUp(KeyEvent event) {
        return event.getAction() == KeyEvent.ACTION_UP;
    }
}

Related Tutorials