For the application that I am writing, I want to trigger a specific action as soon as the user releases his finger from the screen. I realized that I need to check if event.getAction () is ACTION_UP, but all I get from getAction () is ACTION_DOWN. My code is as follows:
menu = new MenuView(this); menu.setBackgroundColor(Color.WHITE); menu.setKeepScreenOn(true); ... setContentView(menu); menu.requestFocus(); ... public class MenuView extends View { ... public MenuView(Context context) { super(context); setFocusable(true); }
Does anyone know what is causing the problem?
Thanks in advance.
source share