Rabbit-R1/original r1/smali/smali_classes2/androidx/transition/Scene.smali

273 lines
6.6 KiB
Smali
Raw Normal View History

2024-05-21 16:08:36 -05:00
.class public Landroidx/transition/Scene;
.super Ljava/lang/Object;
.source "Scene.java"
# instance fields
.field private mContext:Landroid/content/Context;
.field private mEnterAction:Ljava/lang/Runnable;
.field private mExitAction:Ljava/lang/Runnable;
.field private mLayout:Landroid/view/View;
.field private mLayoutId:I
.field private mSceneRoot:Landroid/view/ViewGroup;
# direct methods
.method public constructor <init>(Landroid/view/ViewGroup;)V
.locals 1
.line 89
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Landroidx/transition/Scene;->mLayoutId:I
iput-object p1, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
return-void
.end method
.method private constructor <init>(Landroid/view/ViewGroup;ILandroid/content/Context;)V
.locals 0
.line 108
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p3, p0, Landroidx/transition/Scene;->mContext:Landroid/content/Context;
iput-object p1, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
iput p2, p0, Landroidx/transition/Scene;->mLayoutId:I
return-void
.end method
.method public constructor <init>(Landroid/view/ViewGroup;Landroid/view/View;)V
.locals 1
.line 124
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Landroidx/transition/Scene;->mLayoutId:I
iput-object p1, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
iput-object p2, p0, Landroidx/transition/Scene;->mLayout:Landroid/view/View;
return-void
.end method
.method public static getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
.locals 1
.line 209
sget v0, Landroidx/transition/R$id;->transition_current_scene:I
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->getTag(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroidx/transition/Scene;
return-object p0
.end method
.method public static getSceneForLayout(Landroid/view/ViewGroup;ILandroid/content/Context;)Landroidx/transition/Scene;
.locals 2
.line 63
sget v0, Landroidx/transition/R$id;->transition_scene_layoutid_cache:I
.line 64
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->getTag(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/util/SparseArray;
if-nez v0, :cond_0
.line 66
new-instance v0, Landroid/util/SparseArray;
invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V
.line 67
sget v1, Landroidx/transition/R$id;->transition_scene_layoutid_cache:I
invoke-virtual {p0, v1, v0}, Landroid/view/ViewGroup;->setTag(ILjava/lang/Object;)V
.line 69
:cond_0
invoke-virtual {v0, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/transition/Scene;
if-eqz v1, :cond_1
return-object v1
.line 73
:cond_1
new-instance v1, Landroidx/transition/Scene;
invoke-direct {v1, p0, p1, p2}, Landroidx/transition/Scene;-><init>(Landroid/view/ViewGroup;ILandroid/content/Context;)V
.line 74
invoke-virtual {v0, p1, v1}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
return-object v1
.end method
.method static setCurrentScene(Landroid/view/ViewGroup;Landroidx/transition/Scene;)V
.locals 1
.line 196
sget v0, Landroidx/transition/R$id;->transition_current_scene:I
invoke-virtual {p0, v0, p1}, Landroid/view/ViewGroup;->setTag(ILjava/lang/Object;)V
return-void
.end method
# virtual methods
.method public enter()V
.locals 3
iget v0, p0, Landroidx/transition/Scene;->mLayoutId:I
if-gtz v0, :cond_0
iget-object v0, p0, Landroidx/transition/Scene;->mLayout:Landroid/view/View;
if-eqz v0, :cond_2
.line 170
:cond_0
invoke-virtual {p0}, Landroidx/transition/Scene;->getSceneRoot()Landroid/view/ViewGroup;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewGroup;->removeAllViews()V
iget v0, p0, Landroidx/transition/Scene;->mLayoutId:I
if-lez v0, :cond_1
iget-object v0, p0, Landroidx/transition/Scene;->mContext:Landroid/content/Context;
.line 173
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
iget v1, p0, Landroidx/transition/Scene;->mLayoutId:I
iget-object v2, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
goto :goto_0
:cond_1
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
iget-object v1, p0, Landroidx/transition/Scene;->mLayout:Landroid/view/View;
.line 175
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
:cond_2
:goto_0
iget-object v0, p0, Landroidx/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
if-eqz v0, :cond_3
.line 181
invoke-interface {v0}, Ljava/lang/Runnable;->run()V
:cond_3
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
.line 184
invoke-static {v0, p0}, Landroidx/transition/Scene;->setCurrentScene(Landroid/view/ViewGroup;Landroidx/transition/Scene;)V
return-void
.end method
.method public exit()V
.locals 1
iget-object v0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
.line 149
invoke-static {v0}, Landroidx/transition/Scene;->getCurrentScene(Landroid/view/ViewGroup;)Landroidx/transition/Scene;
move-result-object v0
if-ne v0, p0, :cond_0
iget-object p0, p0, Landroidx/transition/Scene;->mExitAction:Ljava/lang/Runnable;
if-eqz p0, :cond_0
.line 151
invoke-interface {p0}, Ljava/lang/Runnable;->run()V
:cond_0
return-void
.end method
.method public getSceneRoot()Landroid/view/ViewGroup;
.locals 0
iget-object p0, p0, Landroidx/transition/Scene;->mSceneRoot:Landroid/view/ViewGroup;
return-object p0
.end method
.method isCreatedFromLayoutResource()Z
.locals 0
iget p0, p0, Landroidx/transition/Scene;->mLayoutId:I
if-lez p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method public setEnterAction(Ljava/lang/Runnable;)V
.locals 0
iput-object p1, p0, Landroidx/transition/Scene;->mEnterAction:Ljava/lang/Runnable;
return-void
.end method
.method public setExitAction(Ljava/lang/Runnable;)V
.locals 0
iput-object p1, p0, Landroidx/transition/Scene;->mExitAction:Ljava/lang/Runnable;
return-void
.end method