Merge "Don't update height if recycler view was scrolled" into rvc-qpr-dev am: a7f7189c11
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12065946 Change-Id: I6c985b4cfab343e1adef1db586ca4357752f57b4
This commit is contained in:
@@ -2640,7 +2640,10 @@ public class ChooserActivity extends ResolverActivity implements
|
|||||||
}
|
}
|
||||||
RecyclerView recyclerView = mChooserMultiProfilePagerAdapter.getActiveAdapterView();
|
RecyclerView recyclerView = mChooserMultiProfilePagerAdapter.getActiveAdapterView();
|
||||||
ChooserGridAdapter gridAdapter = mChooserMultiProfilePagerAdapter.getCurrentRootAdapter();
|
ChooserGridAdapter gridAdapter = mChooserMultiProfilePagerAdapter.getCurrentRootAdapter();
|
||||||
if (gridAdapter == null || recyclerView == null) {
|
// Skip height calculation if recycler view was scrolled to prevent it inaccurately
|
||||||
|
// calculating the height, as the logic below does not account for the scrolled offset.
|
||||||
|
if (gridAdapter == null || recyclerView == null
|
||||||
|
|| recyclerView.computeVerticalScrollOffset() != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user