Improved flow workaround

This commit is contained in:
M66B
2022-03-03 11:46:02 +01:00
parent 5993960668
commit 81860958c4

View File

@@ -1661,10 +1661,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ConstraintLayout cl = (ConstraintLayout) flow.getParent();
for (int id : flow.getReferencedIds()) {
View v = cl.findViewById(id);
// flow.removeView(v);
// cl.removeView(v);
cl.post(new Runnable() {
@Override
public void run() {
try {
flow.removeView(v);
cl.removeView(v);
} catch (Throwable ex) {
Log.e(ex);
}
}
});
// https://github.com/androidx/constraintlayout/issues/430
v.setVisibility(View.GONE);
// v.setVisibility(View.GONE);
}
}