jsibbold / zoomage

A simple pinch-to-zoom ImageView library for Android
http://jsibbold.github.io/zoomage
Apache License 2.0
316 stars 77 forks source link

Unable to Scroll in Sanpping RecyclerView #89

Closed abbasshah17 closed 4 years ago

abbasshah17 commented 4 years ago

Emulator OS Android 10.

Unable to scroll through a snapping RecyclerView.

item_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"

    android:foreground="@drawable/ripple_effect"
    android:clickable="true"
    android:focusable="true">

    <com.jsibbold.zoomage.ZoomageView

        android:id="@+id/movieDetailsScreenshotImageView"

        android:layout_width="match_parent"
        android:layout_height="match_parent"

        app:zoomage_restrictBounds="true"

        android:contentDescription="@string/dummyImageDescription"

        tools:src="@drawable/temp_movie_screenshot"
        />

</FrameLayout>

fragment_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView
    xmlns:android="http://schemas.android.com/apk/res/android"

    android:id="@+id/screenshotsRecyclerView"

    android:layout_width="match_parent"
    android:layout_height="match_parent"

    android:overScrollMode="never"
    android:background="@color/screen_shots_background_color"
    >

</androidx.recyclerview.widget.RecyclerView>

and finally setting up a snaphelper in the fragment:

snapHelper = new PagerSnapHelper();
snapHelper.attachToRecyclerView(screenshotsRecyclerView);

While the image is zoomable, user is unable to scroll through the list.

jsibbold commented 4 years ago

Can you try the latest snapshot?

abbasshah17 commented 4 years ago

Sorry for the late response, I will try it and let you know.

abbasshah17 commented 4 years ago

Getting a

ERROR: Failed to resolve: com.jsibbold:zoomage:1.3.1-SNAPSHOT
Show in Project Structure dialog
Affected Modules: app

after adding the following line in app.gradle

implementation 'com.jsibbold:zoomage:1.3.1-SNAPSHOT'

jsibbold commented 4 years ago

Did you add this to your repositories

repositories {
    maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
abbasshah17 commented 4 years ago

I did.

jsibbold commented 4 years ago

release 1.3.1 is published, can you give it a try

abbasshah17 commented 4 years ago

Latest version 1.3.1 fixes the issue. Thanks a lot!