mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Convert View to @ReactProp.
Differential Revision: D2479795 committer: Service User <svcscm@fb.com>
This commit is contained in:
committed by
facebook-github-bot-8
parent
1ad1f45fe6
commit
bf598647d2
@@ -12,24 +12,21 @@ package com.facebook.react.uimanager;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* A partial implementation of {@link ViewManager} that applies common properties such as background
|
||||
* color, opacity and CSS layout. Implementations should make sure to call
|
||||
* {@code super.updateView()} in order for these properties to be applied.
|
||||
* Common base class for most of the {@link ViewManager}s. It provides support for most common
|
||||
* properties through extending {@link BaseViewManager}. It also reduces boilerplate by specifying
|
||||
* the type of shadow node to be {@link ReactShadowNode} and providing default, empty implementation
|
||||
* for some of the methods of {@link ViewManager} interface.
|
||||
*
|
||||
* @param <T> the view handled by this manager
|
||||
*/
|
||||
public abstract class SimpleViewManager<T extends View> extends ViewManager<T, ReactShadowNode> {
|
||||
public abstract class SimpleViewManager<T extends View> extends
|
||||
BaseViewManager<T, ReactShadowNode> {
|
||||
|
||||
@Override
|
||||
public ReactShadowNode createCSSNodeInstance() {
|
||||
return new ReactShadowNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateView(T root, CatalystStylesDiffMap props) {
|
||||
BaseViewPropertyApplicator.applyCommonViewProperties(root, props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExtraData(T root, Object extraData) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user