mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate ViewManagerResolver & UIManagerModuleListener to Kotlin (#49501)
Summary: Migrate two more `com.facebook.react.uimanager` interfaces to Kotlin ## Changelog: [INTERNAL] - Migrate ViewManagerResolver & UIManagerModuleListener to Kotlin Pull Request resolved: https://github.com/facebook/react-native/pull/49501 Test Plan: ```bash yarn test-android yarn android ``` Reviewed By: rshest Differential Revision: D69836273 Pulled By: cortinico fbshipit-source-id: cbdddc1ecf432127426fc07a9df6ed824db63e73
This commit is contained in:
committed by
Facebook GitHub Bot
parent
236db59a26
commit
4bafd4734e
+4
-7
@@ -5,17 +5,14 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
package com.facebook.react.uimanager
|
||||
|
||||
/**
|
||||
* Listener used to hook into the UIManager update process. Deprecated: use UIManagerListener
|
||||
* instead. This will be deleted in some future release.
|
||||
*/
|
||||
@Deprecated
|
||||
/** Listener used to hook into the UIManager update process. */
|
||||
@Deprecated("Use UIManagerListener instead. This will be deleted in some future release.")
|
||||
public interface UIManagerModuleListener {
|
||||
/**
|
||||
* Called right before view updates are dispatched at the end of a batch. This is useful if a
|
||||
* module needs to add UIBlocks to the queue before it is flushed.
|
||||
*/
|
||||
void willDispatchViewUpdates(UIManagerModule uiManager);
|
||||
public fun willDispatchViewUpdates(uiManager: UIManagerModule)
|
||||
}
|
||||
-26
@@ -1,26 +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.uimanager;
|
||||
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/** Enables lazy discovery of a specific {@link ViewManager} by its name. */
|
||||
public interface ViewManagerResolver {
|
||||
/**
|
||||
* {@class UIManagerModule} class uses this method to get a ViewManager by its name. This is the
|
||||
* same name that comes from JS by {@code UIManager.ViewManagerName} call.
|
||||
*/
|
||||
@Nullable
|
||||
ViewManager getViewManager(String viewManagerName);
|
||||
|
||||
/**
|
||||
* Provides a list of view manager names to register in JS as {@code UIManager.ViewManagerName}
|
||||
*/
|
||||
Collection<String> getViewManagerNames();
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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.uimanager
|
||||
|
||||
/** Enables lazy discovery of a specific [ViewManager] by its name. */
|
||||
public interface ViewManagerResolver {
|
||||
/**
|
||||
* [UIManagerModule] class uses this method to get a [ViewManager] by its name. This is the same
|
||||
* name that comes from JS by `UIManager.ViewManagerName` call.
|
||||
*/
|
||||
public fun getViewManager(viewManagerName: String): ViewManager<*, *>?
|
||||
|
||||
/** Provides a list of view manager names to register in JS as `UIManager.ViewManagerName` */
|
||||
public fun getViewManagerNames(): Collection<String>
|
||||
}
|
||||
Reference in New Issue
Block a user