Android: use Fabric component codegen output instead of checked in files
Summary: For core components, we can start using the codegen output during build time instead of the checked in files in: https://github.com/facebook/react-native/tree/master/ReactAndroid/src/main/java/com/facebook/react/viewmanagers Note: Some files seemed to be handwritten, so this only removed those that use codegen. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D25453157 fbshipit-source-id: f7eabddfd3fd668bef0c4aef3fddcb38c8b046a0
This commit is contained in:
Родитель
331dc2a998
Коммит
15a3a01082
|
@ -1,41 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ActivityIndicatorViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ActivityIndicatorViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ActivityIndicatorViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "hidesWhenStopped":
|
||||
mViewManager.setHidesWhenStopped(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "animating":
|
||||
mViewManager.setAnimating(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "color":
|
||||
mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "size":
|
||||
mViewManager.setSize(view, (String) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface ActivityIndicatorViewManagerInterface<T extends View> {
|
||||
void setHidesWhenStopped(T view, boolean value);
|
||||
void setAnimating(T view, boolean value);
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setSize(T view, @Nullable String value);
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class AndroidDrawerLayoutManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & AndroidDrawerLayoutManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public AndroidDrawerLayoutManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "keyboardDismissMode":
|
||||
mViewManager.setKeyboardDismissMode(view, (String) value);
|
||||
break;
|
||||
case "drawerBackgroundColor":
|
||||
mViewManager.setDrawerBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "drawerPosition":
|
||||
mViewManager.setDrawerPosition(view, (String) value);
|
||||
break;
|
||||
case "drawerWidth":
|
||||
mViewManager.setDrawerWidth(view, value == null ? null : ((Double) value).floatValue());
|
||||
break;
|
||||
case "drawerLockMode":
|
||||
mViewManager.setDrawerLockMode(view, (String) value);
|
||||
break;
|
||||
case "statusBarBackgroundColor":
|
||||
mViewManager.setStatusBarBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCommand(T view, String commandName, ReadableArray args) {
|
||||
switch (commandName) {
|
||||
case "openDrawer":
|
||||
mViewManager.openDrawer(view);
|
||||
break;
|
||||
case "closeDrawer":
|
||||
mViewManager.closeDrawer(view);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface AndroidDrawerLayoutManagerInterface<T extends View> {
|
||||
void setKeyboardDismissMode(T view, @Nullable String value);
|
||||
void setDrawerBackgroundColor(T view, @Nullable Integer value);
|
||||
void setDrawerPosition(T view, @Nullable String value);
|
||||
void setDrawerWidth(T view, @Nullable Float value);
|
||||
void setDrawerLockMode(T view, @Nullable String value);
|
||||
void setStatusBarBackgroundColor(T view, @Nullable Integer value);
|
||||
void openDrawer(T view);
|
||||
void closeDrawer(T view);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class AndroidProgressBarManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & AndroidProgressBarManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public AndroidProgressBarManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "styleAttr":
|
||||
mViewManager.setStyleAttr(view, value == null ? null : (String) value);
|
||||
break;
|
||||
case "typeAttr":
|
||||
mViewManager.setTypeAttr(view, value == null ? null : (String) value);
|
||||
break;
|
||||
case "indeterminate":
|
||||
mViewManager.setIndeterminate(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "progress":
|
||||
mViewManager.setProgress(view, value == null ? 0f : ((Double) value).doubleValue());
|
||||
break;
|
||||
case "animating":
|
||||
mViewManager.setAnimating(view, value == null ? true : (boolean) value);
|
||||
break;
|
||||
case "color":
|
||||
mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "testID":
|
||||
mViewManager.setTestID(view, value == null ? "" : (String) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface AndroidProgressBarManagerInterface<T extends View> {
|
||||
void setStyleAttr(T view, @Nullable String value);
|
||||
void setTypeAttr(T view, @Nullable String value);
|
||||
void setIndeterminate(T view, boolean value);
|
||||
void setProgress(T view, double value);
|
||||
void setAnimating(T view, boolean value);
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setTestID(T view, @Nullable String value);
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class AndroidSwipeRefreshLayoutManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & AndroidSwipeRefreshLayoutManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public AndroidSwipeRefreshLayoutManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "enabled":
|
||||
mViewManager.setEnabled(view, value == null ? true : (boolean) value);
|
||||
break;
|
||||
case "colors":
|
||||
mViewManager.setColors(view, (ReadableArray) value);
|
||||
break;
|
||||
case "progressBackgroundColor":
|
||||
mViewManager.setProgressBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "size":
|
||||
mViewManager.setSize(view, value == null ? 1 : ((Double) value).intValue());
|
||||
break;
|
||||
case "progressViewOffset":
|
||||
mViewManager.setProgressViewOffset(view, value == null ? 0f : ((Double) value).floatValue());
|
||||
break;
|
||||
case "refreshing":
|
||||
mViewManager.setRefreshing(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCommand(T view, String commandName, ReadableArray args) {
|
||||
switch (commandName) {
|
||||
case "setNativeRefreshing":
|
||||
mViewManager.setNativeRefreshing(view, args.getBoolean(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
public interface AndroidSwipeRefreshLayoutManagerInterface<T extends View> {
|
||||
void setEnabled(T view, boolean value);
|
||||
void setColors(T view, @Nullable ReadableArray value);
|
||||
void setProgressBackgroundColor(T view, @Nullable Integer value);
|
||||
void setSize(T view, int value);
|
||||
void setProgressViewOffset(T view, float value);
|
||||
void setRefreshing(T view, boolean value);
|
||||
void setNativeRefreshing(T view, boolean value);
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class AndroidSwitchManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & AndroidSwitchManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public AndroidSwitchManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "disabled":
|
||||
mViewManager.setDisabled(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "enabled":
|
||||
mViewManager.setEnabled(view, value == null ? true : (boolean) value);
|
||||
break;
|
||||
case "thumbColor":
|
||||
mViewManager.setThumbColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackColorForFalse":
|
||||
mViewManager.setTrackColorForFalse(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackColorForTrue":
|
||||
mViewManager.setTrackColorForTrue(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "value":
|
||||
mViewManager.setValue(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "on":
|
||||
mViewManager.setOn(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "thumbTintColor":
|
||||
mViewManager.setThumbTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackTintColor":
|
||||
mViewManager.setTrackTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCommand(T view, String commandName, ReadableArray args) {
|
||||
switch (commandName) {
|
||||
case "setNativeValue":
|
||||
mViewManager.setNativeValue(view, args.getBoolean(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface AndroidSwitchManagerInterface<T extends View> {
|
||||
void setDisabled(T view, boolean value);
|
||||
void setEnabled(T view, boolean value);
|
||||
void setThumbColor(T view, @Nullable Integer value);
|
||||
void setTrackColorForFalse(T view, @Nullable Integer value);
|
||||
void setTrackColorForTrue(T view, @Nullable Integer value);
|
||||
void setValue(T view, boolean value);
|
||||
void setOn(T view, boolean value);
|
||||
void setThumbTintColor(T view, @Nullable Integer value);
|
||||
void setTrackTintColor(T view, @Nullable Integer value);
|
||||
void setNativeValue(T view, boolean value);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class MaskedViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & MaskedViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public MaskedViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface MaskedViewManagerInterface<T extends View> {
|
||||
// No props
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ModalHostViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ModalHostViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ModalHostViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "animationType":
|
||||
mViewManager.setAnimationType(view, (String) value);
|
||||
break;
|
||||
case "presentationStyle":
|
||||
mViewManager.setPresentationStyle(view, (String) value);
|
||||
break;
|
||||
case "transparent":
|
||||
mViewManager.setTransparent(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "statusBarTranslucent":
|
||||
mViewManager.setStatusBarTranslucent(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "hardwareAccelerated":
|
||||
mViewManager.setHardwareAccelerated(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "animated":
|
||||
mViewManager.setAnimated(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "supportedOrientations":
|
||||
mViewManager.setSupportedOrientations(view, (ReadableArray) value);
|
||||
break;
|
||||
case "identifier":
|
||||
mViewManager.setIdentifier(view, value == null ? 0 : ((Double) value).intValue());
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
public interface ModalHostViewManagerInterface<T extends View> {
|
||||
void setAnimationType(T view, @Nullable String value);
|
||||
void setPresentationStyle(T view, @Nullable String value);
|
||||
void setTransparent(T view, boolean value);
|
||||
void setStatusBarTranslucent(T view, boolean value);
|
||||
void setHardwareAccelerated(T view, boolean value);
|
||||
void setAnimated(T view, boolean value);
|
||||
void setSupportedOrientations(T view, @Nullable ReadableArray value);
|
||||
void setIdentifier(T view, int value);
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class ProgressViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & ProgressViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public ProgressViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "progressViewStyle":
|
||||
mViewManager.setProgressViewStyle(view, (String) value);
|
||||
break;
|
||||
case "progress":
|
||||
mViewManager.setProgress(view, value == null ? 0f : ((Double) value).floatValue());
|
||||
break;
|
||||
case "progressTintColor":
|
||||
mViewManager.setProgressTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackTintColor":
|
||||
mViewManager.setTrackTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "progressImage":
|
||||
mViewManager.setProgressImage(view, (ReadableMap) value);
|
||||
break;
|
||||
case "trackImage":
|
||||
mViewManager.setTrackImage(view, (ReadableMap) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
|
||||
public interface ProgressViewManagerInterface<T extends View> {
|
||||
void setProgressViewStyle(T view, @Nullable String value);
|
||||
void setProgress(T view, float value);
|
||||
void setProgressTintColor(T view, @Nullable Integer value);
|
||||
void setTrackTintColor(T view, @Nullable Integer value);
|
||||
void setProgressImage(T view, @Nullable ReadableMap value);
|
||||
void setTrackImage(T view, @Nullable ReadableMap value);
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SafeAreaViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SafeAreaViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SafeAreaViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "emulateUnlessSupported":
|
||||
mViewManager.setEmulateUnlessSupported(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface SafeAreaViewManagerInterface<T extends View> {
|
||||
void setEmulateUnlessSupported(T view, boolean value);
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SegmentedControlManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SegmentedControlManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SegmentedControlManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "values":
|
||||
mViewManager.setValues(view, (ReadableArray) value);
|
||||
break;
|
||||
case "selectedIndex":
|
||||
mViewManager.setSelectedIndex(view, value == null ? 0 : ((Double) value).intValue());
|
||||
break;
|
||||
case "enabled":
|
||||
mViewManager.setEnabled(view, value == null ? true : (boolean) value);
|
||||
break;
|
||||
case "tintColor":
|
||||
mViewManager.setTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "textColor":
|
||||
mViewManager.setTextColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "backgroundColor":
|
||||
mViewManager.setBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "momentary":
|
||||
mViewManager.setMomentary(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
|
||||
public interface SegmentedControlManagerInterface<T extends View> {
|
||||
void setValues(T view, @Nullable ReadableArray value);
|
||||
void setSelectedIndex(T view, int value);
|
||||
void setEnabled(T view, boolean value);
|
||||
void setTintColor(T view, @Nullable Integer value);
|
||||
void setTextColor(T view, @Nullable Integer value);
|
||||
void setBackgroundColor(T view, @Nullable Integer value);
|
||||
void setMomentary(T view, boolean value);
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class SliderManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & SliderManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public SliderManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "disabled":
|
||||
mViewManager.setDisabled(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "enabled":
|
||||
mViewManager.setEnabled(view, value == null ? true : (boolean) value);
|
||||
break;
|
||||
case "maximumTrackImage":
|
||||
mViewManager.setMaximumTrackImage(view, (ReadableMap) value);
|
||||
break;
|
||||
case "maximumTrackTintColor":
|
||||
mViewManager.setMaximumTrackTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "maximumValue":
|
||||
mViewManager.setMaximumValue(view, value == null ? 1f : ((Double) value).doubleValue());
|
||||
break;
|
||||
case "minimumTrackImage":
|
||||
mViewManager.setMinimumTrackImage(view, (ReadableMap) value);
|
||||
break;
|
||||
case "minimumTrackTintColor":
|
||||
mViewManager.setMinimumTrackTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "minimumValue":
|
||||
mViewManager.setMinimumValue(view, value == null ? 0f : ((Double) value).doubleValue());
|
||||
break;
|
||||
case "step":
|
||||
mViewManager.setStep(view, value == null ? 0f : ((Double) value).doubleValue());
|
||||
break;
|
||||
case "testID":
|
||||
mViewManager.setTestID(view, value == null ? "" : (String) value);
|
||||
break;
|
||||
case "thumbImage":
|
||||
mViewManager.setThumbImage(view, (ReadableMap) value);
|
||||
break;
|
||||
case "thumbTintColor":
|
||||
mViewManager.setThumbTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackImage":
|
||||
mViewManager.setTrackImage(view, (ReadableMap) value);
|
||||
break;
|
||||
case "value":
|
||||
mViewManager.setValue(view, value == null ? 0f : ((Double) value).doubleValue());
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
|
||||
public interface SliderManagerInterface<T extends View> {
|
||||
void setDisabled(T view, boolean value);
|
||||
void setEnabled(T view, boolean value);
|
||||
void setMaximumTrackImage(T view, @Nullable ReadableMap value);
|
||||
void setMaximumTrackTintColor(T view, @Nullable Integer value);
|
||||
void setMaximumValue(T view, double value);
|
||||
void setMinimumTrackImage(T view, @Nullable ReadableMap value);
|
||||
void setMinimumTrackTintColor(T view, @Nullable Integer value);
|
||||
void setMinimumValue(T view, double value);
|
||||
void setStep(T view, double value);
|
||||
void setTestID(T view, @Nullable String value);
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
void setThumbTintColor(T view, @Nullable Integer value);
|
||||
void setTrackImage(T view, @Nullable ReadableMap value);
|
||||
void setValue(T view, double value);
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaDelegate.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
||||
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
||||
|
||||
public class UnimplementedNativeViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & UnimplementedNativeViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
||||
public UnimplementedNativeViewManagerDelegate(U viewManager) {
|
||||
super(viewManager);
|
||||
}
|
||||
@Override
|
||||
public void setProperty(T view, String propName, @Nullable Object value) {
|
||||
switch (propName) {
|
||||
case "name":
|
||||
mViewManager.setName(view, value == null ? "" : (String) value);
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public interface UnimplementedNativeViewManagerInterface<T extends View> {
|
||||
void setName(T view, @Nullable String value);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_target", "rn_android_library")
|
||||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_root_target", "react_native_target", "rn_android_library")
|
||||
|
||||
rn_android_library(
|
||||
name = "drawer",
|
||||
|
@ -26,6 +26,6 @@ rn_android_library(
|
|||
react_native_target("java/com/facebook/react/uimanager:uimanager"),
|
||||
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
|
||||
react_native_target("java/com/facebook/react/views/scroll:scroll"),
|
||||
react_native_target("java/com/facebook/react/viewmanagers:viewmanagers"),
|
||||
react_native_root_target("Libraries:generated_components_java-FBReactNativeComponentSpec"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_target", "rn_android_library")
|
||||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_root_target", "react_native_target", "rn_android_library")
|
||||
|
||||
rn_android_library(
|
||||
name = "modal",
|
||||
|
@ -17,6 +17,7 @@ rn_android_library(
|
|||
YOGA_TARGET,
|
||||
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
|
||||
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||
react_native_root_target("Libraries:generated_components_java-FBReactNativeComponentSpec"),
|
||||
react_native_target("java/com/facebook/react/bridge:bridge"),
|
||||
react_native_target("java/com/facebook/react/common:common"),
|
||||
react_native_target("java/com/facebook/react/module/annotations:annotations"),
|
||||
|
@ -25,7 +26,6 @@ rn_android_library(
|
|||
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
|
||||
react_native_target("java/com/facebook/react/views/common:common"),
|
||||
react_native_target("java/com/facebook/react/views/view:view"),
|
||||
react_native_target("java/com/facebook/react/viewmanagers:viewmanagers"),
|
||||
react_native_target("res:modal"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_target", "rn_android_library")
|
||||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_root_target", "react_native_target", "rn_android_library")
|
||||
|
||||
rn_android_library(
|
||||
name = "progressbar",
|
||||
|
@ -19,6 +19,6 @@ rn_android_library(
|
|||
react_native_target("java/com/facebook/react/module/annotations:annotations"),
|
||||
react_native_target("java/com/facebook/react/uimanager:uimanager"),
|
||||
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
|
||||
react_native_target("java/com/facebook/react/viewmanagers:viewmanagers"),
|
||||
react_native_root_target("Libraries:generated_components_java-FBReactNativeComponentSpec"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_target", "rn_android_library")
|
||||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_root_target", "react_native_target", "rn_android_library")
|
||||
|
||||
rn_android_library(
|
||||
name = "slider",
|
||||
|
@ -22,6 +22,6 @@ rn_android_library(
|
|||
react_native_target("java/com/facebook/react/common:common"),
|
||||
react_native_target("java/com/facebook/react/uimanager:uimanager"),
|
||||
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
|
||||
react_native_target("java/com/facebook/react/viewmanagers:viewmanagers"),
|
||||
react_native_root_target("Libraries:generated_components_java-FBReactNativeComponentSpec"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_target", "rn_android_library")
|
||||
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_root_target", "react_native_target", "rn_android_library")
|
||||
|
||||
rn_android_library(
|
||||
name = "swiperefresh",
|
||||
|
@ -26,6 +26,6 @@ rn_android_library(
|
|||
react_native_target("java/com/facebook/react/views/scroll:scroll"),
|
||||
],
|
||||
exported_deps = [
|
||||
react_native_target("java/com/facebook/react/viewmanagers:viewmanagers"),
|
||||
react_native_root_target("Libraries:generated_components_java-FBReactNativeComponentSpec"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_target", "rn_android_library")
|
||||
load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_root_target", "react_native_target", "rn_android_library")
|
||||
|
||||
rn_android_library(
|
||||
name = "switchview",
|
||||
|
@ -24,6 +24,6 @@ rn_android_library(
|
|||
react_native_target("java/com/facebook/react/common:common"),
|
||||
react_native_target("java/com/facebook/react/uimanager:uimanager"),
|
||||
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
|
||||
react_native_target("java/com/facebook/react/viewmanagers:viewmanagers"),
|
||||
react_native_root_target("Libraries:generated_components_java-FBReactNativeComponentSpec"),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -268,9 +268,7 @@ module.exports = {
|
|||
packageName?: string,
|
||||
): FilesOutput {
|
||||
// TODO: This doesn't support custom package name yet.
|
||||
// TODO: But it customizes the name here temporarily to prepare for Fabric RNTester support.
|
||||
const normalizedPackageName =
|
||||
packageName != null ? packageName : 'com.facebook.react.viewmanagers';
|
||||
const normalizedPackageName = 'com.facebook.react.viewmanagers';
|
||||
const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`;
|
||||
|
||||
const files = new Map();
|
||||
|
|
|
@ -216,9 +216,7 @@ module.exports = {
|
|||
packageName?: string,
|
||||
): FilesOutput {
|
||||
// TODO: This doesn't support custom package name yet.
|
||||
// TODO: But it customizes the name here temporarily to prepare for Fabric RNTester support.
|
||||
const normalizedPackageName =
|
||||
packageName != null ? packageName : 'com.facebook.react.viewmanagers';
|
||||
const normalizedPackageName = 'com.facebook.react.viewmanagers';
|
||||
const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`;
|
||||
|
||||
const files = new Map();
|
||||
|
|
Загрузка…
Ссылка в новой задаче