@OnBind static void onBind( ComponentContext c, MatrixDrawable mountedDrawable, @FromBoundsDefined Integer drawableWidth, @FromBoundsDefined Integer drawableHeight) { mountedDrawable.bind(drawableWidth, drawableHeight); }
@GetExtraAccessibilityNodesCount static int getExtraAccessibilityNodesCount( @Prop(optional = true, resType = ResType.BOOL) boolean accessibleClickableSpans, @FromBoundsDefined ClickableSpan[] clickableSpans) { return (accessibleClickableSpans && clickableSpans != null) ? clickableSpans.length : 0; }
@OnMount static void onMount( ComponentContext c, MatrixDrawable matrixDrawable, @Prop(resType = ResType.DRAWABLE) Drawable drawable, @FromBoundsDefined DrawableMatrix drawableMatrix) { matrixDrawable.mount(drawable, drawableMatrix); }
@Prop(optional = true) boolean clipToBounds, @Prop(optional = true) ClickableSpanListener spanListener, final @FromBoundsDefined CharSequence processedText, @FromBoundsDefined Layout textLayout, @FromBoundsDefined Float textLayoutTranslationY, @FromBoundsDefined ClickableSpan[] clickableSpans, @FromBoundsDefined ImageSpan[] imageSpans) {
@GetExtraAccessibilityNodeAt static int getExtraAccessibilityNodeAt( int x, int y, @Prop(resType = ResType.STRING) CharSequence text, @FromBoundsDefined Layout textLayout, @FromBoundsDefined ClickableSpan[] clickableSpans) { final Spanned spanned = (Spanned) text; for (int i = 0; i < clickableSpans.length; i++) { final ClickableSpan span = clickableSpans[i]; final int start = spanned.getSpanStart(span); final int end = spanned.getSpanEnd(span); textLayout.getSelectionPath(start, end, sTempPath); sTempPath.computeBounds(sTempRectF, /* unused */true); if (sTempRectF.contains(x, y)) { return i; } } return INVALID_ID; } }
@Prop(optional = true) HorizontalScrollEventsController eventsController, @State final ScrollPosition lastScrollPosition, @FromBoundsDefined int componentWidth, @FromBoundsDefined int componentHeight, @FromBoundsDefined final YogaDirection layoutDirection) {
int componentBoundsTop, @Prop(resType = ResType.STRING) CharSequence text, @FromBoundsDefined Layout textLayout, @FromBoundsDefined ClickableSpan[] clickableSpans) { final Spanned spanned = (Spanned) text;