mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b8b4fb8a74
Summary: @public There are some properties that we want to handle on a View level, as opposed to a FlatShadowNode level. For example, scale or alpha, that can be done very efficiently in hardware. Once we pop FlatShadowNode to a separate View, we need to apply these properties. This is where `BaseViewManager` comes in handy. Reviewed By: sriramramani Differential Revision: D2694290
31 lines
894 B
Java
31 lines
894 B
Java
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
package com.facebook.react.flat;
|
|
|
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
import com.facebook.react.uimanager.BaseViewManager;
|
|
|
|
abstract class FlatViewManager<C extends FlatShadowNode> extends BaseViewManager<FlatViewGroup, C> {
|
|
|
|
@Override
|
|
protected FlatViewGroup createViewInstance(ThemedReactContext reactContext) {
|
|
return new FlatViewGroup(reactContext);
|
|
}
|
|
|
|
@Override
|
|
public void setBackgroundColor(FlatViewGroup view, int backgroundColor) {
|
|
// suppress
|
|
}
|
|
|
|
@Override
|
|
public void updateExtraData(FlatViewGroup root, Object extraData) {
|
|
}
|
|
}
|