java - Single listclick does not get executed, but longclick does -


i'm having listfragment list, not single clicks. long clicks recognised.

        listview listview = getlistview();          listview.setonitemclicklistener(new onitemclicklistener() {             @override             public void onitemclick(adapterview<?> parent, view view,                       int position, long id) {                 log.i(null, "single click not work.");             }         });   // contextual action bar (cab).         listview.setonitemlongclicklistener(new onitemlongclicklistener() {             @override             public boolean onitemlongclick(adapterview<?> parent, view view,                   int position, long id) {                 log.i(null, "does work.");             }         }); 

i had similar problem , resolved invalidating listview's views when created , after scroll

listview.setonscrolllistener(new onscrolllistener() {     public void onscrollstatechanged(abslistview view, int scrollstate) {         if ( scrollstate == onscrolllistener.scroll_state_idle )         {           listview.invalidateviews();         }      }      @override     public void onscroll(abslistview arg0, int arg1, int arg2, int arg3) {} }); 

i hope helps


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -