Last active
December 28, 2017 10:22
-
-
Save passiondroid/ca6cff70ed66c10e7862b8df107775d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ItemHolderInfo recordPreLayoutInformation(@NonNull RecyclerView.State state, @NonNull RecyclerView.ViewHolder viewHolder, int changeFlags, @NonNull List<Object> payloads) { | |
if (changeFlags == FLAG_CHANGED) { | |
for (Object payload : payloads) { | |
if (payload instanceof String) { | |
return new CharacterItemHolderInfo((String) payload); | |
} | |
} | |
} | |
return super.recordPreLayoutInformation(state, viewHolder, changeFlags, payloads); | |
} | |
public static class CharacterItemHolderInfo extends ItemHolderInfo { | |
public String updateAction; | |
public CharacterItemHolderInfo(String updateAction) { | |
this.updateAction = updateAction; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment