Android ScrollView Intercepts Clicks, should not do that -


i have view onclicklistener inside of scrollview. view should react on clicks, scrollview interpretes touches action_move , intercepts touch events, cannot click view.

i have modified scrollview follows (because in viewpager , needs disable scrolling viewpager)

@override public boolean onintercepttouchevent(motionevent p_event) {     if (p_event.getaction() == motionevent.action_move) {         return true;     }     return super.onintercepttouchevent(p_event); }  @override public boolean ontouchevent(motionevent p_event) {     if (p_event.getaction() == motionevent.action_move && getparent() != null) {         getparent().requestdisallowintercepttouchevent(true);     }     return super.ontouchevent(p_event); } 

how can change sensitivity of scrollview not register tiniest movements action_move , pass touch events children?

thanks help!

nevermind, fixed it! first part not necessary, if modify code follows works fine:

@override public boolean onintercepttouchevent(motionevent p_event) {     /*if (p_event.getaction() == motionevent.action_move) {         return true;     }*/     return super.onintercepttouchevent(p_event); }  @override public boolean ontouchevent(motionevent p_event) {     if (p_event.getaction() == motionevent.action_move && getparent() != null) {         getparent().requestdisallowintercepttouchevent(true);     }     return super.ontouchevent(p_event); } 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -