mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-29 12:22:21 -05:00
Message: render(): Dynamic icon size
This commit is contained in:
parent
c5eef56151
commit
b1e7a35acf
@ -96,7 +96,7 @@ public class Message {
|
|||||||
canvas = new SpannableString("\n " + text);
|
canvas = new SpannableString("\n " + text);
|
||||||
if (hasIcon()) {
|
if (hasIcon()) {
|
||||||
Drawable drawable = context.getResources().getDrawable(icon);
|
Drawable drawable = context.getResources().getDrawable(icon);
|
||||||
drawable.setBounds(0, 0, 16, 16);
|
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
|
||||||
canvas.setSpan(new ImageSpan(drawable, ImageSpan.ALIGN_BOTTOM), 1, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
canvas.setSpan(new ImageSpan(drawable, ImageSpan.ALIGN_BOTTOM), 1, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user