Improved flow workaround

pull/194/merge
M66B 4 years ago
parent 5993960668
commit 81860958c4

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

Loading…
Cancel
Save