-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate ReactVirtualTextViewManager to kotlin and reduce visibility t…
…ointernal (#47402) Summary: Pull Request resolved: #47402 Migrate ReactVirtualTextViewManager to kotlin and reduce visibility tointernal changelog: [Android][Breaking] Reduce visibility of ReactVirtualTextViewManager to internal Reviewed By: cortinico Differential Revision: D65462051 fbshipit-source-id: fa6daef4e557d527d594616ca032ebf0180cbba2
- Loading branch information
1 parent
5c3c152
commit 4a119c4
Showing
5 changed files
with
41 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
...ReactAndroid/src/main/java/com/facebook/react/views/text/ReactVirtualTextViewManager.java
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
...e/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactVirtualTextViewManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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 | ||
|
||
import android.view.View | ||
import com.facebook.react.module.annotations.ReactModule | ||
import com.facebook.react.uimanager.BaseViewManager | ||
import com.facebook.react.uimanager.ThemedReactContext | ||
|
||
/** | ||
* Manages raw text nodes. Since they are used only as a virtual nodes any type of native view | ||
* operation will throw an [IllegalStateException] | ||
*/ | ||
@ReactModule(name = ReactVirtualTextViewManager.REACT_CLASS) | ||
internal class ReactVirtualTextViewManager : BaseViewManager<View, ReactVirtualTextShadowNode>() { | ||
|
||
public override fun getName(): String = REACT_CLASS | ||
|
||
protected override fun createViewInstance(context: ThemedReactContext): View { | ||
throw IllegalStateException("Attempt to create a native view for RCTVirtualText") | ||
} | ||
|
||
public override fun updateExtraData(view: View, extraData: Any): Unit {} | ||
|
||
public override fun getShadowNodeClass(): Class<ReactVirtualTextShadowNode> = | ||
ReactVirtualTextShadowNode::class.java | ||
|
||
override fun createShadowNodeInstance(): ReactVirtualTextShadowNode = ReactVirtualTextShadowNode() | ||
|
||
internal companion object { | ||
public const val REACT_CLASS: String = "RCTVirtualText" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters