151 lines
3.6 KiB
Smali
151 lines
3.6 KiB
Smali
.class public final Lcom/discord/app/AppViewFlipper;
|
|
.super Landroid/widget/ViewFlipper;
|
|
.source "AppViewFlipper.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public d:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/ViewFlipper;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
invoke-static {p0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setForwardingWindowInsetsListener(Landroid/view/ViewGroup;)V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ViewFlipper;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/discord/R$a;->AppViewFlipper:[I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, p2, v0, v1, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1, v1, v1}, Landroid/content/res/TypedArray;->getInt(II)I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/discord/app/AppViewFlipper;->d:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p2
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
throw p2
|
|
|
|
:cond_0
|
|
const-string p1, "attrs"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onAttachedToWindow()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Landroid/widget/ViewFlipper;->onAttachedToWindow()V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ViewFlipper;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v0, v0, Landroidx/coordinatorlayout/widget/CoordinatorLayout;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p0}, Landroidx/core/view/ViewGroupKt;->getChildren(Landroid/view/ViewGroup;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lkotlin/sequences/Sequence;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/view/View;
|
|
|
|
new-instance v2, Lcom/discord/app/AppScrollingViewBehavior$a;
|
|
|
|
invoke-direct {v2}, Lcom/discord/app/AppScrollingViewBehavior$a;-><init>()V
|
|
|
|
invoke-static {v1, v2}, Landroidx/core/view/ViewCompat;->setOnApplyWindowInsetsListener(Landroid/view/View;Landroidx/core/view/OnApplyWindowInsetsListener;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onFinishInflate()V
|
|
.locals 1
|
|
|
|
invoke-super {p0}, Landroid/widget/ViewFlipper;->onFinishInflate()V
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ViewFlipper;->isInEditMode()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget v0, p0, Lcom/discord/app/AppViewFlipper;->d:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/app/AppViewFlipper;->setDisplayedChild(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setDisplayedChild(I)V
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ViewFlipper;->getDisplayedChild()I
|
|
|
|
move-result v0
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
invoke-super {p0, p1}, Landroid/widget/ViewFlipper;->setDisplayedChild(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|