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 ava 2 s . c o m import android.view.MotionEvent; /** * Observer pattern to get events from the global controller * */ public abstract class TouchListener { public TouchListener() { register(); } /** * Connect this with the global controls notifier */ public void register() { GlobalController.getInstance().registerTouch(this); } /** * Disconnect this from the global controls notifier */ public void unregister() { GlobalController.getInstance().unregisterTouch(this); } /** * Called if this is registered and if the global controller * gets an event e * @param e */ public abstract void motion(MotionEvent e); }