android - How can I slide a vertical SeekBar in a ScrollView -
i've made vertical seekbar overriding ondraw method , flipping 90 degrees. need put in scrollview.
the actual layout structure is
<scrollview> <relativelayout> ... <linearlayout> <com.mypackage.verticalseekbar/>
is possible make sure scrollview not touch event of seekbar?
try :
listview lv = (listview)findviewbyid(r.id.mylistview); // listview inside scrollview lv.setontouchlistener(new listview.ontouchlistener() { @override public boolean ontouch(view v, motionevent event) { int action = event.getaction(); switch (action) { case motionevent.action_down: // disallow scrollview intercept touch events. v.getparent().requestdisallowintercepttouchevent(true); break; case motionevent.action_up: // allow scrollview intercept touch events. v.getparent().requestdisallowintercepttouchevent(false); break; } // handle listview touch events. v.ontouchevent(event); return true; } });
in above code have used listview scroll inside scrollview can approach
Comments
Post a Comment