MCPcopy Create free account
hub / github.com/neworld/spanner / image

Method image

lib/src/main/java/lt/neworld/spanner/Spans.java:227–234  ·  view source on GitHub ↗

The drawable must already have bounds (Drawable#setBounds(Rect)) @see android.text.style.ImageSpan#ImageSpan(Drawable)

(@NonNull final Drawable drawable)

Source from the content-addressed store, hash-verified

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)})

Callers 1

onCreateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected