mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Convert ReactTextInlineImageShadowNode (#48576)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48576 Changelog: [Internal] Reviewed By: cortinico Differential Revision: D67981753 fbshipit-source-id: 5d8a2408af9af350c0d3b369677ff8ee00335554
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fe8d102663
commit
c7785e7ead
-24
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text.internal;
|
||||
|
||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||
import com.facebook.react.views.text.internal.span.TextInlineImageSpan;
|
||||
import com.facebook.yoga.YogaNode;
|
||||
|
||||
/** Base class for {@link YogaNode}s that represent inline images. */
|
||||
public abstract class ReactTextInlineImageShadowNode extends LayoutShadowNode {
|
||||
|
||||
/**
|
||||
* Build a {@link TextInlineImageSpan} from this node. This will be added to the TextView in place
|
||||
* of this node.
|
||||
*/
|
||||
public abstract TextInlineImageSpan buildInlineImageSpan();
|
||||
|
||||
public ReactTextInlineImageShadowNode() {}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text.internal
|
||||
|
||||
import com.facebook.react.uimanager.LayoutShadowNode
|
||||
import com.facebook.react.views.text.internal.span.TextInlineImageSpan
|
||||
import com.facebook.yoga.YogaNode
|
||||
|
||||
/** Base class for [YogaNode]s that represent inline images. */
|
||||
internal abstract class ReactTextInlineImageShadowNode : LayoutShadowNode() {
|
||||
/**
|
||||
* Build a [TextInlineImageSpan] from this node. This will be added to the TextView in place of
|
||||
* this node.
|
||||
*/
|
||||
public abstract fun buildInlineImageSpan(): TextInlineImageSpan
|
||||
}
|
||||
Reference in New Issue
Block a user