lineage-sdk self-removing prefs: move reap from onBindViewHolder to onAttached
*) Eliminates visibility of the pref removal. You could previously see vertical movement of text during initial display of replaced prefs. *) In addition, when reaping, use setVisible(false) instead of removePreference. Otherwise, array out of bounds index exceptions occur in frameworks pref support libraries (as a result of moving from onBindViewHolder to onAttached). Change-Id: I1a0045552572a590f89715f8d94156eddaaec469
This commit is contained in:
committed by
Bruno Martins
parent
3c54d58691
commit
027b615325
@@ -43,6 +43,12 @@ public class SelfRemovingListPreference extends ListPreference {
|
||||
mConstraints = new ConstraintsHelper(context, null, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttached() {
|
||||
super.onAttached();
|
||||
mConstraints.onAttached();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(PreferenceViewHolder holder) {
|
||||
super.onBindViewHolder(holder);
|
||||
|
||||
Reference in New Issue
Block a user