Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging jumps several rows when padding is set on RecyclerView #18

Open
timothyjc opened this issue Sep 10, 2015 · 4 comments
Open

Dragging jumps several rows when padding is set on RecyclerView #18

timothyjc opened this issue Sep 10, 2015 · 4 comments

Comments

@timothyjc
Copy link

Use this layout to see this issue then try and drag the last item in the list/grid upwards to see it jump several positions:

<android.support.v7.widget.RecyclerView
    android:id="@+id/recycler_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:paddingBottom="150dp"
    android:paddingTop="150dp" />
@AkshayChordiya
Copy link

@timothyjc
I too am seeing this issue. My code is shown below:

<android.support.v7.widget.RecyclerView
        android:id="@+id/songs_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipToPadding="false"
        android:paddingTop="16dp"/>

The last item creates a weird situation.
I hope @iPaulPro fixes it soon. Thank you so much.

@gajicm93
Copy link

Any news on this?

@serhii-k
Copy link

serhii-k commented Nov 7, 2017

It happens when the paddingTop is set to more than 0dp. Has anyone found a workaround/fix?

@serhii-k
Copy link

serhii-k commented Nov 7, 2017

Well. Instead of setting the top and bottom paddings, you can create a special type of a ViewHolder to mimic paddings, then disable its movement. Here you can find how to implement this: #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants