tags:

views:

23

answers:

1

Hi,

I've adapted the GridInputProcessor-class of the 3D-Gallery ( http://android.git.kernel.org/?p=platform/packages/apps/Gallery3D.git;a=blob;f=src/com/cooliris/media/GridInputProcessor.java;h=91dfd4783be6b21ec8ff2518a5c244752570e90d;hb=HEAD ) so that it detects upward/downward swipes.

The detection of swipes works, but I now want to start another activity (or draw a bitmap on the currently displayed activity), but I seemingly can't use startActivity(mContext, myIntent), because the class declaration is public final class GridInputProcessor implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener { so it doesn't extend Activity...

Can I still start an Activity through this class, or how would I go about doing this? I have also tried sending a broadcast, but this is also not "implemented".

Thanks, Nick

A: 

I went with re-using the context of an activity that I know is running at the time of the swipe (where the actual swipe occurs) via:

theOtherActivitysContext.startActivity(...)

Nick