Back to project page texting.
The source code is released under:
Free to use, distribute, do anything.
If you think the Android project texting 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.skk.texting.gesture; /*from w ww . ja v a 2 s .c om*/ import android.view.MotionEvent; import java.util.HashMap; public class MotionEventRecorder { private static HashMap<String, MotionEvent> recordedEvents = new HashMap<String, MotionEvent>(); public static void recordEvent(MotionEvent event, String id){ MotionEvent newEvent = MotionEvent.obtain(event); recordedEvents.put(id, newEvent); } public static MotionEvent replayEvent(String id){ MotionEvent remove = recordedEvents.remove(id); return remove; } public static MotionEvent peekEvent(String id){ return recordedEvents.get(id); } }