Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GestureListener on gridview

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any one has the code of GestureListener on gridview items .because i should perform left ,right flig on gridview and long press and touch and click on gridview items. .while long press on the items in grid view i should get the x,y coordinate values,but
gridview.setOnItemLongClickListener(new OnItemLongClickListener()
{

@Override
public boolean onItemLongClick(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {}

this long clickable does not have parameters of motionevent...


can any one tell how to add gesturelistener on gridview
 
David Bei
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We must do 2 steps to work the long press event:

1. set item's long click listener:



2. in our Adapter's overided function "getView", we shuold set every item be LongClickable.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic