ParallaxHeaderViewPager
ParallaxHeaderViewPager copied to clipboard
RecyclerView header wrong position on screen rotate.
When the screem rotate header don´t translate to the correct position. Thank you¡
@mariolope10 @boxme
re-open the app when the app has died in background the header don´t translate to the correct position.
@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 I added your solution was work. But there has the other issue in RecyclerView.
- In landscape scroll to the bottom
- rotate to portrait and then scroll to the top
- there is issue in header