mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update OSS generated Android component delegates
Summary: $title Now that the codegen handles the new PlatformColors, regenerating the checked in native component files. Changelog: [Internal] (Note: this ignores all push blocking failures!) Reviewed By: mdvacca Differential Revision: D20175914 fbshipit-source-id: fa7b8e5139dcfe06f49582d7810fae12e1e1fb4b
This commit is contained in:
committed by
Facebook Github Bot
parent
03ac8e872e
commit
8643b5560e
+6
-5
@@ -11,6 +11,7 @@ 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;
|
||||
@@ -30,13 +31,13 @@ public class AndroidSwitchManagerDelegate<T extends View, U extends BaseViewMana
|
||||
mViewManager.setEnabled(view, value == null ? true : (boolean) value);
|
||||
break;
|
||||
case "thumbColor":
|
||||
mViewManager.setThumbColor(view, value == null ? null : ((Double) value).intValue());
|
||||
mViewManager.setThumbColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackColorForFalse":
|
||||
mViewManager.setTrackColorForFalse(view, value == null ? null : ((Double) value).intValue());
|
||||
mViewManager.setTrackColorForFalse(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackColorForTrue":
|
||||
mViewManager.setTrackColorForTrue(view, value == null ? null : ((Double) value).intValue());
|
||||
mViewManager.setTrackColorForTrue(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "value":
|
||||
mViewManager.setValue(view, value == null ? false : (boolean) value);
|
||||
@@ -45,10 +46,10 @@ public class AndroidSwitchManagerDelegate<T extends View, U extends BaseViewMana
|
||||
mViewManager.setOn(view, value == null ? false : (boolean) value);
|
||||
break;
|
||||
case "thumbTintColor":
|
||||
mViewManager.setThumbTintColor(view, value == null ? null : ((Double) value).intValue());
|
||||
mViewManager.setThumbTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
case "trackTintColor":
|
||||
mViewManager.setTrackTintColor(view, value == null ? null : ((Double) value).intValue());
|
||||
mViewManager.setTrackTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
||||
break;
|
||||
default:
|
||||
super.setProperty(view, propName, value);
|
||||
|
||||
Reference in New Issue
Block a user