Fix empty conversation update item text.
For some reason, if an EmojiTextView has a wrap content width and some other set of conditions occur, the view will not request a relayout when text changes. This change inelegantly calls request layout more often to prevent that from happening.
This commit is contained in:
parent
c15ea8c0b4
commit
0d215d609b
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,7 @@ import android.text.Spanned;
|
|||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -137,6 +138,10 @@ public class EmojiTextView extends AppCompatTextView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getLayoutParams() != null && getLayoutParams().width == ViewGroup.LayoutParams.WRAP_CONTENT) {
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
public void setOverflowText(@Nullable CharSequence overflowText) {
|
||||
|
|
Loading…
Add table
Reference in a new issue