The drawable must already have bounds (Drawable#setBounds(Rect)) @see android.text.style.ImageSpan#ImageSpan(Drawable)
(@NonNull final Drawable drawable)
| 225 | * @see android.text.style.ImageSpan#ImageSpan(Drawable) |
| 226 | */ |
| 227 | public static lt.neworld.spanner.ImageSpan image(@NonNull final Drawable drawable) { |
| 228 | return new lt.neworld.spanner.ImageSpan(new SpanBuilder() { |
| 229 | @Override |
| 230 | public Object build() { |
| 231 | return new ImageSpan(drawable); |
| 232 | } |
| 233 | }); |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * The drawable must already have bounds ({@link Drawable#setBounds(Rect)}) |