ReactSwitchManager$ReactSwitchShadowNode.smali
.class public Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;
.super Lcom/facebook/react/uimanager/LayoutShadowNode;
.source "ReactSwitchManager.java"
# interfaces
.implements Lcom/facebook/yoga/YogaMeasureFunction;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/facebook/react/views/switchview/ReactSwitchManager;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "ReactSwitchShadowNode"
.end annotation
# instance fields
.field public mHeight:I
.field public mMeasured:Z
.field public mWidth:I
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Lcom/facebook/react/uimanager/LayoutShadowNode;-><init>()V
invoke-direct {p0}, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->initMeasureFunction()V
return-void
.end method
.method public synthetic constructor <init>(Lcom/facebook/react/views/switchview/ReactSwitchManager$1;)V
.registers 2
invoke-direct {p0}, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;-><init>()V
return-void
.end method
.method private initMeasureFunction()V
.registers 1
invoke-virtual {p0, p0}, Lcom/facebook/react/uimanager/ReactShadowNodeImpl;->setMeasureFunction(Lcom/facebook/yoga/YogaMeasureFunction;)V
return-void
.end method
# virtual methods
.method public measure(Lcom/facebook/yoga/YogaNode;FLcom/facebook/yoga/YogaMeasureMode;FLcom/facebook/yoga/YogaMeasureMode;)J
.registers 6
iget-boolean p1, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->mMeasured:Z
if-nez p1, :cond_27
new-instance p1, Lcom/facebook/react/views/switchview/ReactSwitch;
invoke-virtual {p0}, Lcom/facebook/react/uimanager/ReactShadowNodeImpl;->getThemedContext()Lcom/facebook/react/uimanager/ThemedReactContext;
move-result-object p2
invoke-direct {p1, p2}, Lcom/facebook/react/views/switchview/ReactSwitch;-><init>(Landroid/content/Context;)V
const/4 p2, 0x0
invoke-virtual {p1, p2}, Landroidx/appcompat/widget/SwitchCompat;->setShowText(Z)V
invoke-static {p2, p2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p2
invoke-virtual {p1, p2, p2}, Landroid/widget/CompoundButton;->measure(II)V
invoke-virtual {p1}, Landroid/widget/CompoundButton;->getMeasuredWidth()I
move-result p2
iput p2, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->mWidth:I
invoke-virtual {p1}, Landroid/widget/CompoundButton;->getMeasuredHeight()I
move-result p1
iput p1, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->mHeight:I
const/4 p1, 0x1
iput-boolean p1, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->mMeasured:Z
:cond_27
iget p1, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->mWidth:I
iget p2, p0, Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;->mHeight:I
invoke-static {p1, p2}, Lcom/facebook/yoga/YogaMeasureOutput;->make(II)J
move-result-wide p1
return-wide p1
.end method