sayyam / carouselview

A simple library to add carousel view in android app.
Apache License 2.0
1.15k stars 260 forks source link

Prevent scroll for subview was zoomed. #107

Closed YKW93 closed 5 years ago

YKW93 commented 5 years ago

Prevent scroll for subview was zoomed.

use case below.

carouselView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
            @Override
            public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
                int dx = oldScrollX - scrollX;
                if (v instanceof ZoomableImageView) {
                    boolean scrollable = ((ZoomableImageView) v).canScroll(-dx);
                    carouselView.setLockScroll(!scrollable);
                }
            }
        });
ablyeom commented 5 years ago

@sayyam I need this function, please merge it.

HansenBudinata commented 5 years ago

@sayyam I need this function as well, please kindly merge it =D