Status Update
Comments
al...@android.com <al...@android.com> #2
Does this issue occur when using the latest version (24.0.0) of the support library?
al...@android.com <al...@android.com>
to...@gmail.com <to...@gmail.com> #3
Yes.
It is also occurs in the latest version(24.0.0)
It is also occurs in the latest version(24.0.0)
al...@android.com <al...@android.com>
au...@google.com <au...@google.com> #4
Can you also share the activity code to see how you are attaching the fragment to the activity?
to...@gmail.com <to...@gmail.com> #5
I am so sorry for being late.
I have attached the codes
I have attached the codes
Description
Version used: 23.4.0
Theme used:
Devices/Android versions reproduced on: 6.0, 5.1.2
【OverView】
This problem is bug of ViewPager on Fragment.
(The bug does not occure in ViewPager on Activity)
OnPageChangeListener#onPageSelected is called When the Application restored(onRestoreInstanceState)
- Relevant code to trigger the issue.
1. add a Fragment(contained ViewPager) to Activity
2. change position of ViewPager (other than 0)
3. Press the Home Button
4. To end the process of the Application(e.g. DDMS)
5.Press the OverView Button and return the Application
-> OnPageChangeListener#onPageSelected(int) is called when the Application is restored.
This Argument is the position after the change, but the display of VIewPager returns to the initial state.
【Solution(proposal)】
I think
To resolve the problem, substitute ss.position for mCurItem.
I want to ask you an opinion.
- A screenrecord or screenshots showing the issue (if UI related).