getmsg
getmsg

Reputation: 132

scrollview contains some dragging views,how to drag down the view with scrollview will be move down

in my app Scrollview contains some views,i want to drag down the view,and at the same time the Scrollview will move down,but now in order to implements view drad down, i have to overrided Scrollview's onInterceptTouchEvent method to return false, thus when the view drag down the Scrollview is not move down.give me some helps,please.

enter image description here

Upvotes: 0

Views: 552

Answers (1)

getmsg
getmsg

Reputation: 132

the problem had solved.

if(v.getParent().equals(mLayout)){

            if(event.getRawY()>mDisplayMetrics.heightPixels*2/3+100){
                nonLockingScrollView.scrollBy(0, 5);
            }else if(event.getRawY()<50){
                nonLockingScrollView.scrollBy(0, -5);
            }
        }

Upvotes: 1

Related Questions