Merge "Fix searched item isn't highlighted" am: 363c529dc6
am: 1d07de566d
am: 85768b3723
am: 051c1b298d
Change-Id: Ib75d421f6b4a4ee97006a3427bb4b1111c5ece2f
This commit is contained in:
@@ -792,14 +792,16 @@ public abstract class SettingsPreferenceFragment extends InstrumentedFragment
|
|||||||
super.onBindViewHolder(holder, position);
|
super.onBindViewHolder(holder, position);
|
||||||
if (position == mHighlightPosition) {
|
if (position == mHighlightPosition) {
|
||||||
View v = holder.itemView;
|
View v = holder.itemView;
|
||||||
if (v.getBackground() != null) {
|
v.post(() -> {
|
||||||
final int centerX = v.getWidth() / 2;
|
if (v.getBackground() != null) {
|
||||||
final int centerY = v.getHeight() / 2;
|
final int centerX = v.getWidth() / 2;
|
||||||
v.getBackground().setHotspot(centerX, centerY);
|
final int centerY = v.getHeight() / 2;
|
||||||
}
|
v.getBackground().setHotspot(centerX, centerY);
|
||||||
v.setPressed(true);
|
}
|
||||||
v.setPressed(false);
|
v.setPressed(true);
|
||||||
mHighlightPosition = -1;
|
v.setPressed(false);
|
||||||
|
mHighlightPosition = -1;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user