2

I have a ScrollView that have a LinearLayout has a child. Also LinearLayout have 3 ImageViews.

When i do scroll i can scroll on whole 3 ImageViews. But i want to limit scrollable area.

How i can do that?

-------------------------------
|                             |
|                            ||
|                            ||
|                            ||
|      SCROLL_VIEW            |
|                             |
|                             |
|                             |
-------scroll limit area-------
|                             |
|                             |
|                             |
|                             |
-------------------------------

Scroll view width & height = full screen

Sergey Shustikov
  • 15,377
  • 12
  • 67
  • 119

1 Answers1

0

add a transparent view in the area where you want to avoid scroll and in the ontouch listener of that view return true.

transparentView.setOnTouchListener(new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) {
                // TODO Auto-generated method stub
                return true;
            }
        });

If ScrollView on Full Screen

Follow this - Synchronise ScrollView scroll positions - android

Community
  • 1
  • 1
SHASHIDHAR MANCHUKONDA
  • 3,302
  • 2
  • 19
  • 40