android - WearableListView LongClick -


i have been trying add longclicklistener wearablelistview

this have done:

listview.setonlongclicklistener(new view.onlongclicklistener() {         @override         public boolean onlongclick(view view) {             toast.maketext(getactivity(), "long", toast.length_short).show();             return false;         }     }); 

here listview wearablelistview. when long click function not called. understand single click have set listview.setclicklistener() , not listview.setonclicklistener() there similar approach long clicks?

thanks!

try use onitemlongclick instead of longclick

listview.setonitemlongclicklistener(new onitemlongclicklistener() {          public boolean onitemlongclick(adapterview<?> arg0, view arg1,                 int pos, long id) {             // todo auto-generated method stub              log.v("long clicked","pos: " + pos);              return true;         }     });  

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -