ReactSwitchManager.smali
.class public Lcom/facebook/react/views/switchview/ReactSwitchManager;
.super Lcom/facebook/react/uimanager/SimpleViewManager;
.source "ReactSwitchManager.java"
# interfaces
.implements Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/facebook/react/uimanager/SimpleViewManager<",
"Lcom/facebook/react/views/switchview/ReactSwitch;",
">;",
"Lcom/facebook/react/viewmanagers/AndroidSwitchManagerInterface<",
"Lcom/facebook/react/views/switchview/ReactSwitch;",
">;"
}
.end annotation
# static fields
.field public static final ON_CHECKED_CHANGE_LISTENER:Landroid/widget/CompoundButton$OnCheckedChangeListener;
.field public static final REACT_CLASS:Ljava/lang/String; = "AndroidSwitch"
# instance fields
.field public final mDelegate:Lcom/facebook/react/uimanager/ViewManagerDelegate;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/facebook/react/uimanager/ViewManagerDelegate<",
"Lcom/facebook/react/views/switchview/ReactSwitch;",
">;"
}
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.registers 1
new-instance v0, Lcom/facebook/react/views/switchview/ReactSwitchManager$1;
invoke-direct {v0}, Lcom/facebook/react/views/switchview/ReactSwitchManager$1;-><init>()V
sput-object v0, Lcom/facebook/react/views/switchview/ReactSwitchManager;->ON_CHECKED_CHANGE_LISTENER:Landroid/widget/CompoundButton$OnCheckedChangeListener;
return-void
.end method
.method public constructor <init>()V
.registers 2
invoke-direct {p0}, Lcom/facebook/react/uimanager/SimpleViewManager;-><init>()V
new-instance v0, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerDelegate;
invoke-direct {v0, p0}, Lcom/facebook/react/viewmanagers/AndroidSwitchManagerDelegate;-><init>(Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
iput-object v0, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager;->mDelegate:Lcom/facebook/react/uimanager/ViewManagerDelegate;
return-void
.end method
.method public static setValueInternal(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
.registers 3
const/4 v0, 0x0
invoke-virtual {p0, v0}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
invoke-virtual {p0, p1}, Lcom/facebook/react/views/switchview/ReactSwitch;->setOn(Z)V
sget-object p1, Lcom/facebook/react/views/switchview/ReactSwitchManager;->ON_CHECKED_CHANGE_LISTENER:Landroid/widget/CompoundButton$OnCheckedChangeListener;
invoke-virtual {p0, p1}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
return-void
.end method
# virtual methods
.method public bridge synthetic addEventEmitters(Lcom/facebook/react/uimanager/ThemedReactContext;Landroid/view/View;)V
.registers 3
check-cast p2, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->addEventEmitters(Lcom/facebook/react/uimanager/ThemedReactContext;Lcom/facebook/react/views/switchview/ReactSwitch;)V
return-void
.end method
.method public addEventEmitters(Lcom/facebook/react/uimanager/ThemedReactContext;Lcom/facebook/react/views/switchview/ReactSwitch;)V
.registers 3
sget-object p1, Lcom/facebook/react/views/switchview/ReactSwitchManager;->ON_CHECKED_CHANGE_LISTENER:Landroid/widget/CompoundButton$OnCheckedChangeListener;
invoke-virtual {p2, p1}, Landroid/widget/CompoundButton;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V
return-void
.end method
.method public createShadowNodeInstance()Lcom/facebook/react/uimanager/LayoutShadowNode;
.registers 3
new-instance v0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;-><init>(Lcom/facebook/react/views/switchview/ReactSwitchManager$1;)V
return-object v0
.end method
.method public bridge synthetic createShadowNodeInstance()Lcom/facebook/react/uimanager/ReactShadowNode;
.registers 2
invoke-virtual {p0}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->createShadowNodeInstance()Lcom/facebook/react/uimanager/LayoutShadowNode;
move-result-object v0
return-object v0
.end method
.method public bridge synthetic createViewInstance(Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
.registers 2
invoke-virtual {p0, p1}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->createViewInstance(Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/switchview/ReactSwitch;
move-result-object p1
return-object p1
.end method
.method public createViewInstance(Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/switchview/ReactSwitch;
.registers 3
new-instance v0, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-direct {v0, p1}, Lcom/facebook/react/views/switchview/ReactSwitch;-><init>(Landroid/content/Context;)V
const/4 p1, 0x0
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/SwitchCompat;->setShowText(Z)V
return-object v0
.end method
.method public getDelegate()Lcom/facebook/react/uimanager/ViewManagerDelegate;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/facebook/react/uimanager/ViewManagerDelegate<",
"Lcom/facebook/react/views/switchview/ReactSwitch;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager;->mDelegate:Lcom/facebook/react/uimanager/ViewManagerDelegate;
return-object v0
.end method
.method public getName()Ljava/lang/String;
.registers 2
const-string v0, "AndroidSwitch"
return-object v0
.end method
.method public getShadowNodeClass()Ljava/lang/Class;
.registers 2
const-class v0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;
return-object v0
.end method
.method public measure(Landroid/content/Context;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/ReadableMap;FLcom/facebook/yoga/YogaMeasureMode;FLcom/facebook/yoga/YogaMeasureMode;[I)J
.registers 10
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
new-instance p2, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-direct {p2, p1}, Lcom/facebook/react/views/switchview/ReactSwitch;-><init>(Landroid/content/Context;)V
const/4 p1, 0x0
invoke-virtual {p2, p1}, Landroidx/appcompat/widget/SwitchCompat;->setShowText(Z)V
invoke-static {p1, p1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p1
invoke-virtual {p2, p1, p1}, Landroid/widget/CompoundButton;->measure(II)V
invoke-virtual {p2}, Landroid/widget/CompoundButton;->getMeasuredWidth()I
move-result p1
int-to-float p1, p1
invoke-static {p1}, Lcom/facebook/react/uimanager/PixelUtil;->toDIPFromPixel(F)F
move-result p1
invoke-virtual {p2}, Landroid/widget/CompoundButton;->getMeasuredHeight()I
move-result p2
int-to-float p2, p2
invoke-static {p2}, Lcom/facebook/react/uimanager/PixelUtil;->toDIPFromPixel(F)F
move-result p2
invoke-static {p1, p2}, Lcom/facebook/yoga/YogaMeasureOutput;->make(FF)J
move-result-wide p1
return-wide p1
.end method
.method public bridge synthetic receiveCommand(Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
.registers 4
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Ljava/lang/String;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2, p3}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->receiveCommand(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
return-void
.end method
.method public receiveCommand(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
.registers 7
.param p1 # Lcom/facebook/react/views/switchview/ReactSwitch;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Ljava/lang/String;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-virtual {p2}, Ljava/lang/String;->hashCode()I
move-result v0
const/4 v1, 0x0
const v2, -0x27eb7e28
if-eq v0, v2, :cond_b
goto :goto_15
:cond_b
const-string v0, "setNativeValue"
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_15
const/4 p2, 0x0
goto :goto_16
:cond_15
:goto_15
const/4 p2, -0x1
:goto_16
if-eqz p2, :cond_19
goto :goto_25
:cond_19
if-eqz p3, :cond_22
invoke-interface {p3, v1}, Lcom/facebook/react/bridge/ReadableArray;->getBoolean(I)Z
move-result p2
if-eqz p2, :cond_22
const/4 v1, 0x1
:cond_22
invoke-static {p1, v1}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setValueInternal(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
:goto_25
return-void
.end method
.method public bridge synthetic setDisabled(Landroid/view/View;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
defaultBoolean = false
name = "disabled"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setDisabled(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method
.method public setDisabled(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
defaultBoolean = false
name = "disabled"
.end annotation
xor-int/lit8 p2, p2, 0x1
invoke-virtual {p1, p2}, Landroid/widget/CompoundButton;->setEnabled(Z)V
return-void
.end method
.method public bridge synthetic setEnabled(Landroid/view/View;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
defaultBoolean = true
name = "enabled"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setEnabled(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method
.method public setEnabled(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
defaultBoolean = true
name = "enabled"
.end annotation
invoke-virtual {p1, p2}, Landroid/widget/CompoundButton;->setEnabled(Z)V
return-void
.end method
.method public bridge synthetic setNativeValue(Landroid/view/View;Z)V
.registers 3
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setNativeValue(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method
.method public setNativeValue(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
.registers 3
return-void
.end method
.method public bridge synthetic setOn(Landroid/view/View;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
name = "on"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setOn(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method
.method public setOn(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
name = "on"
.end annotation
invoke-static {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setValueInternal(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method
.method public bridge synthetic setThumbColor(Landroid/view/View;Ljava/lang/Integer;)V
.registers 3
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "thumbColor"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setThumbColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
return-void
.end method
.method public setThumbColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
.registers 3
.param p1 # Lcom/facebook/react/views/switchview/ReactSwitch;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "thumbColor"
.end annotation
invoke-virtual {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitch;->setThumbColor(Ljava/lang/Integer;)V
return-void
.end method
.method public bridge synthetic setThumbTintColor(Landroid/view/View;Ljava/lang/Integer;)V
.registers 3
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "thumbTintColor"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setThumbTintColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
return-void
.end method
.method public setThumbTintColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
.registers 3
.param p1 # Lcom/facebook/react/views/switchview/ReactSwitch;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "thumbTintColor"
.end annotation
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setThumbColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
return-void
.end method
.method public bridge synthetic setTrackColorForFalse(Landroid/view/View;Ljava/lang/Integer;)V
.registers 3
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "trackColorForFalse"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setTrackColorForFalse(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
return-void
.end method
.method public setTrackColorForFalse(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
.registers 3
.param p1 # Lcom/facebook/react/views/switchview/ReactSwitch;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "trackColorForFalse"
.end annotation
invoke-virtual {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitch;->setTrackColorForFalse(Ljava/lang/Integer;)V
return-void
.end method
.method public bridge synthetic setTrackColorForTrue(Landroid/view/View;Ljava/lang/Integer;)V
.registers 3
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "trackColorForTrue"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setTrackColorForTrue(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
return-void
.end method
.method public setTrackColorForTrue(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
.registers 3
.param p1 # Lcom/facebook/react/views/switchview/ReactSwitch;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "trackColorForTrue"
.end annotation
invoke-virtual {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitch;->setTrackColorForTrue(Ljava/lang/Integer;)V
return-void
.end method
.method public bridge synthetic setTrackTintColor(Landroid/view/View;Ljava/lang/Integer;)V
.registers 3
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "trackTintColor"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setTrackTintColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
return-void
.end method
.method public setTrackTintColor(Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
.registers 3
.param p1 # Lcom/facebook/react/views/switchview/ReactSwitch;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
customType = "Color"
name = "trackTintColor"
.end annotation
invoke-virtual {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitch;->setTrackColor(Ljava/lang/Integer;)V
return-void
.end method
.method public bridge synthetic setValue(Landroid/view/View;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
name = "value"
.end annotation
check-cast p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0, p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setValue(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method
.method public setValue(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
.registers 3
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
name = "value"
.end annotation
invoke-static {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitchManager;->setValueInternal(Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
return-void
.end method