Fix cut off icon in conversation header.
This commit is contained in:
parent
e18e4454e4
commit
957221e118
1 changed files with 2 additions and 2 deletions
|
@ -177,12 +177,12 @@ public class ConversationHeaderView extends ConstraintLayout {
|
||||||
private @NonNull CharSequence prependIcon(@NonNull CharSequence input, @DrawableRes int iconRes) {
|
private @NonNull CharSequence prependIcon(@NonNull CharSequence input, @DrawableRes int iconRes) {
|
||||||
Drawable drawable = ContextCompat.getDrawable(getContext(), iconRes);
|
Drawable drawable = ContextCompat.getDrawable(getContext(), iconRes);
|
||||||
Preconditions.checkNotNull(drawable);
|
Preconditions.checkNotNull(drawable);
|
||||||
drawable.setBounds(0, 0, (int) DimensionUnit.DP.toPixels(20), (int) DimensionUnit.DP.toPixels(20));
|
drawable.setBounds(0, 0, (int) DimensionUnit.SP.toPixels(20), (int) DimensionUnit.SP.toPixels(20));
|
||||||
drawable.setColorFilter(ContextCompat.getColor(getContext(), R.color.signal_colorOnSurface), PorterDuff.Mode.SRC_ATOP);
|
drawable.setColorFilter(ContextCompat.getColor(getContext(), R.color.signal_colorOnSurface), PorterDuff.Mode.SRC_ATOP);
|
||||||
|
|
||||||
return new SpannableStringBuilder()
|
return new SpannableStringBuilder()
|
||||||
.append(SpanUtil.buildCenteredImageSpan(drawable))
|
.append(SpanUtil.buildCenteredImageSpan(drawable))
|
||||||
.append(SpanUtil.space(8, DimensionUnit.DP))
|
.append(SpanUtil.space(8, DimensionUnit.SP))
|
||||||
.append(input);
|
.append(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue