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 a v a 2 s .co m import android.view.MotionEvent; /** * This class is automatically connected to GlobalController * (which is a singleton existing during the whole execution) * with the observer design pattern. When the GlobalController * gets an action button, it notifies every connected ButtonListeners. * * @see GlobalController * */ public abstract class ButtonListener { /** * Constructor (connect the object to the controller) */ public ButtonListener() { GlobalController.getInstance().registerButton(this); } /** * When a button is pushed * @param event */ public abstract void button(MotionEvent event); }