.class public final Landroidx/appcompat/widget/ViewStubCompat; .super Landroid/view/View; # annotations .annotation build Landroidx/annotation/RestrictTo; value = { .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope; } .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener; } .end annotation # instance fields .field private mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener; .field private mInflatedId:I .field private mInflatedViewRef:Ljava/lang/ref/WeakReference; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ref/WeakReference<", "Landroid/view/View;", ">;" } .end annotation .end field .field private mInflater:Landroid/view/LayoutInflater; .field private mLayoutResource:I # direct methods .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V .locals 1 const/4 v0, 0x0 invoke-direct {p0, p1, p2, v0}, Landroidx/appcompat/widget/ViewStubCompat;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V return-void .end method .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;I)V .locals 2 invoke-direct {p0, p1, p2, p3}, Landroid/view/View;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V const/4 v0, 0x0 iput v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I sget-object v1, Landroidx/appcompat/R$styleable;->ViewStubCompat:[I invoke-virtual {p1, p2, v1, p3, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray; move-result-object p1 sget p2, Landroidx/appcompat/R$styleable;->ViewStubCompat_android_inflatedId:I const/4 p3, -0x1 invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getResourceId(II)I move-result p2 iput p2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I sget p2, Landroidx/appcompat/R$styleable;->ViewStubCompat_android_layout:I invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I move-result p2 iput p2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I sget p2, Landroidx/appcompat/R$styleable;->ViewStubCompat_android_id:I invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getResourceId(II)I move-result p2 invoke-virtual {p0, p2}, Landroidx/appcompat/widget/ViewStubCompat;->setId(I)V invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V const/16 p1, 0x8 invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ViewStubCompat;->setVisibility(I)V const/4 p1, 0x1 invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ViewStubCompat;->setWillNotDraw(Z)V return-void .end method # virtual methods .method protected final dispatchDraw(Landroid/graphics/Canvas;)V .locals 0 return-void .end method .method public final draw(Landroid/graphics/Canvas;)V .locals 0 .annotation build Landroid/annotation/SuppressLint; value = { "MissingSuperCall" } .end annotation return-void .end method .method public final getInflatedId()I .locals 1 iget v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I return v0 .end method .method public final getLayoutInflater()Landroid/view/LayoutInflater; .locals 1 iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater; return-object v0 .end method .method public final getLayoutResource()I .locals 1 iget v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I return v0 .end method .method public final inflate()Landroid/view/View; .locals 4 invoke-virtual {p0}, Landroidx/appcompat/widget/ViewStubCompat;->getParent()Landroid/view/ViewParent; move-result-object v0 if-eqz v0, :cond_5 instance-of v1, v0, Landroid/view/ViewGroup; if-eqz v1, :cond_5 iget v1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I if-eqz v1, :cond_4 check-cast v0, Landroid/view/ViewGroup; iget-object v1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater; if-eqz v1, :cond_0 iget-object v1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater; goto :goto_0 :cond_0 invoke-virtual {p0}, Landroidx/appcompat/widget/ViewStubCompat;->getContext()Landroid/content/Context; move-result-object v1 invoke-static {v1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater; move-result-object v1 :goto_0 iget v2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I const/4 v3, 0x0 invoke-virtual {v1, v2, v0, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View; move-result-object v1 iget v2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I const/4 v3, -0x1 if-eq v2, v3, :cond_1 iget v2, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I invoke-virtual {v1, v2}, Landroid/view/View;->setId(I)V :cond_1 invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->indexOfChild(Landroid/view/View;)I move-result v2 invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->removeViewInLayout(Landroid/view/View;)V invoke-virtual {p0}, Landroidx/appcompat/widget/ViewStubCompat;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams; move-result-object v3 if-eqz v3, :cond_2 invoke-virtual {v0, v1, v2, v3}, Landroid/view/ViewGroup;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V goto :goto_1 :cond_2 invoke-virtual {v0, v1, v2}, Landroid/view/ViewGroup;->addView(Landroid/view/View;I)V :goto_1 new-instance v0, Ljava/lang/ref/WeakReference; invoke-direct {v0, v1}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V iput-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedViewRef:Ljava/lang/ref/WeakReference; iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener; if-eqz v0, :cond_3 iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener; invoke-interface {v0, p0, v1}, Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;->onInflate(Landroidx/appcompat/widget/ViewStubCompat;Landroid/view/View;)V :cond_3 return-object v1 :cond_4 new-instance v0, Ljava/lang/IllegalArgumentException; const-string v1, "ViewStub must have a valid layoutResource" invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 :cond_5 new-instance v0, Ljava/lang/IllegalStateException; const-string v1, "ViewStub must have a non-null ViewGroup viewParent" invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v0 .end method .method protected final onMeasure(II)V .locals 0 const/4 p1, 0x0 invoke-virtual {p0, p1, p1}, Landroidx/appcompat/widget/ViewStubCompat;->setMeasuredDimension(II)V return-void .end method .method public final setInflatedId(I)V .locals 0 iput p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedId:I return-void .end method .method public final setLayoutInflater(Landroid/view/LayoutInflater;)V .locals 0 iput-object p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflater:Landroid/view/LayoutInflater; return-void .end method .method public final setLayoutResource(I)V .locals 0 iput p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mLayoutResource:I return-void .end method .method public final setOnInflateListener(Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener;)V .locals 0 iput-object p1, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflateListener:Landroidx/appcompat/widget/ViewStubCompat$OnInflateListener; return-void .end method .method public final setVisibility(I)V .locals 1 iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedViewRef:Ljava/lang/ref/WeakReference; if-eqz v0, :cond_1 iget-object v0, p0, Landroidx/appcompat/widget/ViewStubCompat;->mInflatedViewRef:Ljava/lang/ref/WeakReference; invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/view/View; if-eqz v0, :cond_0 invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V return-void :cond_0 new-instance p1, Ljava/lang/IllegalStateException; const-string v0, "setVisibility called on un-referenced view" invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 :cond_1 invoke-super {p0, p1}, Landroid/view/View;->setVisibility(I)V if-eqz p1, :cond_2 const/4 v0, 0x4 if-ne p1, v0, :cond_3 :cond_2 invoke-virtual {p0}, Landroidx/appcompat/widget/ViewStubCompat;->inflate()Landroid/view/View; :cond_3 return-void .end method