Remove jumpiness when rendering reactions.
This commit is contained in:
parent
b8ccc4453e
commit
00b6a222bd
2 changed files with 4 additions and 8 deletions
|
@ -42,7 +42,6 @@ import android.util.AttributeSet;
|
|||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
@ -912,10 +911,7 @@ public class ConversationItem extends LinearLayout implements BindableConversati
|
|||
return;
|
||||
}
|
||||
|
||||
if (bodyBubble.getWidth() != 0) {
|
||||
setReactionsWithWidth(current, bodyBubble.getWidth());
|
||||
}
|
||||
|
||||
setReactionsWithWidth(current, bodyBubble.getWidth());
|
||||
bodyBubble.setOnSizeChangedListener((width, height) -> setReactionsWithWidth(current, width));
|
||||
}
|
||||
|
||||
|
|
|
@ -55,8 +55,6 @@ public class ReactionsConversationView extends LinearLayout {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void clear() {
|
||||
this.records.clear();
|
||||
this.bubbleWidth = 0;
|
||||
|
@ -78,7 +76,9 @@ public class ReactionsConversationView extends LinearLayout {
|
|||
removeAllViews();
|
||||
|
||||
for (Reaction reaction : reactions) {
|
||||
addView(buildPill(getContext(), this, reaction));
|
||||
View pill = buildPill(getContext(), this, reaction);
|
||||
pill.setVisibility(bubbleWidth == 0 ? INVISIBLE : VISIBLE);
|
||||
addView(pill);
|
||||
}
|
||||
|
||||
measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
|
||||
|
|
Loading…
Add table
Reference in a new issue