android - listView inside a ViewFlipper - scrolling problems -


i'm having trouble litview inside viewflipper.

    // gesturedetector class mygesturedetector extends simpleongesturelistener {     @override     public boolean onfling(motionevent e1, motionevent e2, float velocityx, float velocityy) {         try {             if (math.abs(e1.gety() - e2.gety()) > swipe_max_off_path)                 return false;             // right left swipe             if(e1.getx() - e2.getx() > swipe_min_distance && math.abs(velocityx) > swipe_threshold_velocity) {                 iconmanager.instance.leftswipe();                 vf.setinanimation(slideleftin);                 vf.setoutanimation(slideleftout);                 vf.shownext();                 system.out.println("swiiingg!!");                 // left right swipe             }  else if (e2.getx() - e1.getx() > swipe_min_distance && math.abs(velocityx) > swipe_threshold_velocity) {                 iconmanager.instance.rightswipe();                 vf.setinanimation(sliderightin);                 vf.setoutanimation(sliderightout);                 vf.showprevious();             }         } catch (exception e) {             // nothing         }         return false;     }     @override     public boolean onsingletapconfirmed(motionevent e) {         log.e("item click","item click");          intent intentagenda = new intent (activity_main.this, agendaselected.class);         //intentagenda.putextra("lecture_name", homeagendalistadapter.getitemid(3));         startactivity(intentagenda);         return super.onsingletapconfirmed(e);     } } 

this code enables me flip among views in flipper , scroll in lists within different flips. however, makes entire app clickable. if singletap on blank surface, registers click, , sends me intent intentagenda = new intent wants send me. should happen when tap on item within listview!

what can listener on specific lists listen "on lists" , not entire app? believe problem lies within public boolean onsingletapconfirmed, can't see it.

i have not tried above 1 solution work create new onitemclicklistener , setonitemclicklistener(your item click listener) on lists. not use single tap in case create new on itemclick listener more stylish:

    list.setonitemclicklistener(new onitemclicklistener() {          public void onitemclick(adapterview<?> arg0, view arg1, int arg2,                 long arg3) {             intent intentagenda = new intent (activity_main.this, agendaselected.class);             //      //          intentagenda.putextra("lecture_name", homeagendalistadapter.getitemid(3));             startactivity(intentagenda);         }     }); 

if want create more lists can create new item click listener , point every list it.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -