Add DashboardItemAnimator to stop flash

When there is no offset change for identical holder in
animateChange, simply return and don't invoke the
resetAnimation.

Bug: 33198024
Test: make RunSettingsRoboTests
Change-Id: Ib83363873bc5f51e5bd71af5a013ee0756728d1a
This commit is contained in:
jackqdyulei
2016-11-29 17:03:25 -08:00
parent 737ae83a66
commit fa45aee813
4 changed files with 100 additions and 1 deletions

View File

@@ -165,7 +165,7 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
if (position != DashboardData.POSITION_NOT_FOUND) {
// Since usually tile in parameter and tile in mCategories are same instance,
// which is hard to be detected by DiffUtil, so we notifyItemChanged directly.
notifyItemChanged(position);
notifyItemChanged(position, mDashboardData.getItemTypeByPosition(position));
}
}