开发者

Scrollview inside scrollview in android

开发者 https://www.devze.com 2023-02-17 11:12 出处:网络
I am having scrollview inside another scrollview. I want to scroll inner scrollview but oute开发者_Python百科r scrollview is only scrolled.how to solve this problem?

I am having scrollview inside another scrollview. I want to scroll inner scrollview but oute开发者_Python百科r scrollview is only scrolled.how to solve this problem?

Thanks.


    sv01 = (ScrollView) findViewById(R.id.popup_sf_event_scroll_01);
    sv02 = (ScrollView) findViewById(R.id.popup_sf_event_scroll_02);

    sv02.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            if (event.getAction() == MotionEvent.ACTION_UP)
                sv01.requestDisallowInterceptTouchEvent(false);
        else 
                sv01.requestDisallowInterceptTouchEvent(true);

        return false;
        }
    });


in scroll view take one layout and add another scrollview in that layout coz scrollview can hold only one child in it. So that inner scrollview can move for what it is holding in it.

0

精彩评论

暂无评论...
验证码 换一张
取 消