Android examples for User Interface:Key Event
is Back Key Up
//package com.java2s; import android.support.annotation.NonNull; import android.view.KeyEvent; public class Main { public static boolean isBackKeyUp(@NonNull KeyEvent event) { return event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP; }/* w ww . j ava2s. co m*/ }