Back to project page LucyTheMoocher.
The source code is released under:
MIT License
If you think the Android project LucyTheMoocher listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lucythemoocher.controls; //from w w w . j av a 2s.c om import android.view.KeyEvent; /** * Observer pattern to get keys from the global controller * Note that we use an interface for keys and a class for touchEvents * We can't use classes for keysListener since most of the classes using it * already extend classes * */ public interface KeysListener { /** * Connect this with the global controls notifier * use GlobalController.getInstance().registerKey(this); */ public void registerKeys(); /** * Disconnect this from the global controls notifier * use GlobalController.getInstance().unregisterKey(this); */ public void unregisterKeys(); /** * Called if this is registered and if the global controller * gets an event e * @param e */ public void onKeyDown(int KeyCode, KeyEvent event); }