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

Here's how to fix the incorrect ProGuard rules #189

Open
sevar83 opened this issue Sep 27, 2017 · 0 comments
Open

Here's how to fix the incorrect ProGuard rules #189

sevar83 opened this issue Sep 27, 2017 · 0 comments

Comments

@sevar83
Copy link

sevar83 commented Sep 27, 2017

The suggested ProGuard rules in the README

-keep class com.lsjwzh.widget.recyclerviewpager.**
-dontwarn com.lsjwzh.widget.recyclerviewpager.**

are incorrect. They don't do anything. This causes the view restoration to silently fail in production. Here are the proper rules:

-keepclassmembernames class android.support.v7.widget.RecyclerView$SavedState {
    android.os.Parcelable mLayoutState;
}
-keepclassmembernames class android.support.v7.widget.LinearLayoutManager$SavedState {
    int mAnchorPosition;
    int mAnchorOffset;
}
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

1 participant