Fix fragment carousel going to wrong scroll position after rotation
- On devices with no physical buttons, there is a status bar on screen, which triggers an onSizeChanged() method call which causes the ContactDetailFragmentCarousel to scroll to the focused view (which was wrongly set as the ListView in the details page in phone landscape). - Make sure the right view is focused on and remove the manual scroll code in onLayout() in ContactDetailFragmentCarousel because it doesn't do anything because the width of the child view is not correct (when the page is first launched and doesn't cause any scroll changes). Instead, when the data is loaded and we enable/disable swipe, we select the right view to be focused on, which takes care of scrolling to the right page. Bug: 5265640 Change-Id: Id3b568b2d1c3af5d4d6cae285038131bb4cb1a45
Loading
Please register or sign in to comment