ParallaxHeaderViewPager icon indicating copy to clipboard operation
ParallaxHeaderViewPager copied to clipboard

RecyclerView header wrong position on screen rotate.

Open mariolope10 opened this issue 9 years ago • 3 comments

When the screem rotate header don´t translate to the correct position. Thank you¡

mariolope10 avatar Jun 06 '15 09:06 mariolope10

@mariolope10 @boxme
re-open the app when the app has died in background the header don´t translate to the correct position.

seongjujo avatar Aug 17 '15 07:08 seongjujo

@mariolope10 @boxme

solution:

edit RecyclerViewFragment

save mScrollY to instanceState

#!java

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (savedInstanceState != null) {
            int scrollY = savedInstanceState.getInt("scrollY");
            mScrollY = scrollY;
        }
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putInt("scrollY", mScrollY);
    }

seongjujo avatar Aug 17 '15 12:08 seongjujo

@seongjujo I added your solution was work. But there has the other issue in RecyclerView.

  1. In landscape scroll to the bottom
  2. rotate to portrait and then scroll to the top
  3. there is issue in header

ChouCC avatar Oct 28 '15 01:10 ChouCC