OkyDokyman
OkyDokyman

Reputation: 3866

OnTouch and OnLongPress work together

I impleme

public class TextViewer extends Activity implements OnTouchListener

and

tv.setOnLongClickListener(itemLongClickHandler);
tv.setOnTouchListener(this);

But I only the second one works.

Can I have them both work?

Upvotes: 0

Views: 2522

Answers (1)

Phil Lello
Phil Lello

Reputation: 8639

Are you always returning true from onTouch()? You should return false if you want normal event processing to happen.

There may be a better approach than this - what types of event are you looking to handle in onTouch()?

Best wishes,

Phil Lello

Upvotes: 3

Related Questions