2210 lines
60 KiB
Smali
2210 lines
60 KiB
Smali
.class public final Lcom/google/android/material/tabs/TabLayout$TabView;
|
|
.super Landroid/widget/LinearLayout;
|
|
.source "TabLayout.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/google/android/material/tabs/TabLayout;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x11
|
|
name = "TabView"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private badgeAnchorView:Landroid/view/View;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private customIconView:Landroid/widget/ImageView;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private customTextView:Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private customView:Landroid/view/View;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private defaultMaxLines:I
|
|
|
|
.field private iconView:Landroid/widget/ImageView;
|
|
|
|
.field private tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
.field private textView:Landroid/widget/TextView;
|
|
|
|
.field public final synthetic this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/google/android/material/tabs/TabLayout;Landroid/content/Context;)V
|
|
.locals 3
|
|
.param p1 # Lcom/google/android/material/tabs/TabLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
.line 2
|
|
invoke-direct {p0, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 3
|
|
iput v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->defaultMaxLines:I
|
|
|
|
.line 4
|
|
invoke-direct {p0, p2}, Lcom/google/android/material/tabs/TabLayout$TabView;->updateBackgroundDrawable(Landroid/content/Context;)V
|
|
|
|
.line 5
|
|
iget p2, p1, Lcom/google/android/material/tabs/TabLayout;->tabPaddingStart:I
|
|
|
|
iget v0, p1, Lcom/google/android/material/tabs/TabLayout;->tabPaddingTop:I
|
|
|
|
iget v1, p1, Lcom/google/android/material/tabs/TabLayout;->tabPaddingEnd:I
|
|
|
|
iget v2, p1, Lcom/google/android/material/tabs/TabLayout;->tabPaddingBottom:I
|
|
|
|
invoke-static {p0, p2, v0, v1, v2}, Landroidx/core/view/ViewCompat;->d2(Landroid/view/View;IIII)V
|
|
|
|
const/16 p2, 0x11
|
|
|
|
.line 6
|
|
invoke-virtual {p0, p2}, Landroid/widget/LinearLayout;->setGravity(I)V
|
|
|
|
.line 7
|
|
iget-boolean p1, p1, Lcom/google/android/material/tabs/TabLayout;->inlineLabel:Z
|
|
|
|
const/4 p2, 0x1
|
|
|
|
xor-int/2addr p1, p2
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/LinearLayout;->setOrientation(I)V
|
|
|
|
.line 8
|
|
invoke-virtual {p0, p2}, Landroid/widget/LinearLayout;->setClickable(Z)V
|
|
|
|
.line 9
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 p2, 0x3ea
|
|
|
|
invoke-static {p1, p2}, Ls1/i0;->c(Landroid/content/Context;I)Ls1/i0;
|
|
|
|
move-result-object p1
|
|
|
|
.line 10
|
|
invoke-static {p0, p1}, Landroidx/core/view/ViewCompat;->g2(Landroid/view/View;Ls1/i0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$100(Lcom/google/android/material/tabs/TabLayout$TabView;Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/tabs/TabLayout$TabView;->updateBackgroundDrawable(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$1000(Lcom/google/android/material/tabs/TabLayout$TabView;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryUpdateBadgeDrawableBounds(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$400(Lcom/google/android/material/tabs/TabLayout$TabView;Landroid/graphics/Canvas;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/tabs/TabLayout$TabView;->drawBackground(Landroid/graphics/Canvas;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$500(Lcom/google/android/material/tabs/TabLayout$TabView;)Z
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->hasBadgeDrawable()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static synthetic access$600(Lcom/google/android/material/tabs/TabLayout$TabView;)Lcom/google/android/material/badge/BadgeDrawable;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$700(Lcom/google/android/material/tabs/TabLayout$TabView;)Lcom/google/android/material/badge/BadgeDrawable;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->getOrCreateBadge()Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$800(Lcom/google/android/material/tabs/TabLayout$TabView;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->removeBadge()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$900(Lcom/google/android/material/tabs/TabLayout$TabView;)Lcom/google/android/material/badge/BadgeDrawable;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->getBadge()Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private addOnLayoutChangeListener(Landroid/view/View;)V
|
|
.locals 1
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 1
|
|
:cond_0
|
|
new-instance v0, Lcom/google/android/material/tabs/TabLayout$TabView$1;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/google/android/material/tabs/TabLayout$TabView$1;-><init>(Lcom/google/android/material/tabs/TabLayout$TabView;Landroid/view/View;)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->addOnLayoutChangeListener(Landroid/view/View$OnLayoutChangeListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private approximateLineWidth(Landroid/text/Layout;IF)F
|
|
.locals 0
|
|
.param p1 # Landroid/text/Layout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-virtual {p1, p2}, Landroid/text/Layout;->getLineWidth(I)F
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroid/text/Layout;->getPaint()Landroid/text/TextPaint;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/text/TextPaint;->getTextSize()F
|
|
|
|
move-result p1
|
|
|
|
div-float/2addr p3, p1
|
|
|
|
mul-float/2addr p3, p2
|
|
|
|
return p3
|
|
.end method
|
|
|
|
.method private clipViewToPaddingForBadge(Z)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Landroid/widget/LinearLayout;->setClipChildren(Z)V
|
|
|
|
.line 2
|
|
invoke-virtual {p0, p1}, Landroid/widget/LinearLayout;->setClipToPadding(Z)V
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/ViewGroup;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 4
|
|
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->setClipChildren(Z)V
|
|
|
|
.line 5
|
|
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->setClipToPadding(Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private createPreApi18BadgeAnchorRoot()Landroid/widget/FrameLayout;
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Landroid/widget/FrameLayout;
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 2
|
|
new-instance v1, Landroid/widget/FrameLayout$LayoutParams;
|
|
|
|
const/4 v2, -0x2
|
|
|
|
invoke-direct {v1, v2, v2}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private drawBackground(Landroid/graphics/Canvas;)V
|
|
.locals 5
|
|
.param p1 # Landroid/graphics/Canvas;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getLeft()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getTop()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getRight()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getBottom()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private getBadge()Lcom/google/android/material/badge/BadgeDrawable;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private getCustomParentForBadge(Landroid/view/View;)Landroid/widget/FrameLayout;
|
|
.locals 2
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
.line 2
|
|
:cond_0
|
|
sget-boolean v0, Lcom/google/android/material/badge/BadgeUtils;->USE_COMPAT_PARENT:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v1, p1
|
|
|
|
check-cast v1, Landroid/widget/FrameLayout;
|
|
|
|
:cond_1
|
|
return-object v1
|
|
.end method
|
|
|
|
.method private getOrCreateBadge()Lcom/google/android/material/badge/BadgeDrawable;
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/google/android/material/badge/BadgeDrawable;->create(Landroid/content/Context;)Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryUpdateBadgeAnchor()V
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
return-object v0
|
|
|
|
.line 5
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "Unable to create badge"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private hasBadgeDrawable()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private inflateAndAddDefaultIconView()V
|
|
.locals 4
|
|
|
|
.line 1
|
|
sget-boolean v0, Lcom/google/android/material/badge/BadgeUtils;->USE_COMPAT_PARENT:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->createPreApi18BadgeAnchorRoot()Landroid/widget/FrameLayout;
|
|
|
|
move-result-object v0
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, p0
|
|
|
|
.line 4
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object v2
|
|
|
|
sget v3, Lcom/google/android/material/R$layout;->design_layout_tab_icon:I
|
|
|
|
.line 5
|
|
invoke-virtual {v2, v3, v0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/widget/ImageView;
|
|
|
|
iput-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
.line 6
|
|
invoke-virtual {v0, v2, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private inflateAndAddDefaultTextView()V
|
|
.locals 4
|
|
|
|
.line 1
|
|
sget-boolean v0, Lcom/google/android/material/badge/BadgeUtils;->USE_COMPAT_PARENT:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->createPreApi18BadgeAnchorRoot()Landroid/widget/FrameLayout;
|
|
|
|
move-result-object v0
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, p0
|
|
|
|
.line 4
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->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
|
|
|
|
sget v2, Lcom/google/android/material/R$layout;->design_layout_tab_text:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 5
|
|
invoke-virtual {v1, v2, v0, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/widget/TextView;
|
|
|
|
iput-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
.line 6
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private removeBadge()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryRemoveBadgeFromAnchor()V
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 3
|
|
iput-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private tryAttachBadgeToAnchor(Landroid/view/View;)V
|
|
.locals 2
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->hasBadgeDrawable()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->clipViewToPaddingForBadge(Z)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
.line 4
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/tabs/TabLayout$TabView;->getCustomParentForBadge(Landroid/view/View;)Landroid/widget/FrameLayout;
|
|
|
|
move-result-object v1
|
|
|
|
.line 5
|
|
invoke-static {v0, p1, v1}, Lcom/google/android/material/badge/BadgeUtils;->attachBadgeDrawable(Lcom/google/android/material/badge/BadgeDrawable;Landroid/view/View;Landroid/widget/FrameLayout;)V
|
|
|
|
.line 6
|
|
iput-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private tryRemoveBadgeFromAnchor()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->hasBadgeDrawable()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 2
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->clipViewToPaddingForBadge(Z)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 4
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
invoke-static {v1, v0}, Lcom/google/android/material/badge/BadgeUtils;->detachBadgeDrawable(Lcom/google/android/material/badge/BadgeDrawable;Landroid/view/View;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 5
|
|
iput-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private tryUpdateBadgeAnchor()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->hasBadgeDrawable()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 2
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryRemoveBadgeFromAnchor()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
.line 6
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryRemoveBadgeFromAnchor()V
|
|
|
|
.line 7
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryAttachBadgeToAnchor(Landroid/view/View;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 8
|
|
:cond_2
|
|
invoke-direct {p0, v1}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryUpdateBadgeDrawableBounds(Landroid/view/View;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 9
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 10
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getTabLabelVisibility()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-eq v0, v1, :cond_4
|
|
|
|
.line 12
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryRemoveBadgeFromAnchor()V
|
|
|
|
.line 13
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryAttachBadgeToAnchor(Landroid/view/View;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 14
|
|
:cond_4
|
|
invoke-direct {p0, v1}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryUpdateBadgeDrawableBounds(Landroid/view/View;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 15
|
|
:cond_5
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryRemoveBadgeFromAnchor()V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private tryUpdateBadgeDrawableBounds(Landroid/view/View;)V
|
|
.locals 2
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->hasBadgeDrawable()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeAnchorView:Landroid/view/View;
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
invoke-direct {p0, p1}, Lcom/google/android/material/tabs/TabLayout$TabView;->getCustomParentForBadge(Landroid/view/View;)Landroid/widget/FrameLayout;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, p1, v1}, Lcom/google/android/material/badge/BadgeUtils;->setBadgeDrawableBounds(Lcom/google/android/material/badge/BadgeDrawable;Landroid/view/View;Landroid/widget/FrameLayout;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateBackgroundDrawable(Landroid/content/Context;)V
|
|
.locals 5
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabBackgroundResId:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {p1, v0}, Lg/a;->d(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 3
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 4
|
|
iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getDrawableState()[I
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
iput-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
.line 6
|
|
:cond_1
|
|
:goto_0
|
|
new-instance p1, Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-direct {p1}, Landroid/graphics/drawable/GradientDrawable;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 7
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/GradientDrawable;->setColor(I)V
|
|
|
|
.line 8
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-object v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabRippleColorStateList:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
.line 9
|
|
new-instance v0, Landroid/graphics/drawable/GradientDrawable;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/drawable/GradientDrawable;-><init>()V
|
|
|
|
const v2, 0x3727c5ac # 1.0E-5f
|
|
|
|
.line 10
|
|
invoke-virtual {v0, v2}, Landroid/graphics/drawable/GradientDrawable;->setCornerRadius(F)V
|
|
|
|
const/4 v2, -0x1
|
|
|
|
.line 11
|
|
invoke-virtual {v0, v2}, Landroid/graphics/drawable/GradientDrawable;->setColor(I)V
|
|
|
|
.line 12
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-object v2, v2, Lcom/google/android/material/tabs/TabLayout;->tabRippleColorStateList:Landroid/content/res/ColorStateList;
|
|
|
|
.line 13
|
|
invoke-static {v2}, Lcom/google/android/material/ripple/RippleUtils;->convertToRippleDrawableColor(Landroid/content/res/ColorStateList;)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v2
|
|
|
|
.line 14
|
|
new-instance v3, Landroid/graphics/drawable/RippleDrawable;
|
|
|
|
iget-object v4, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-boolean v4, v4, Lcom/google/android/material/tabs/TabLayout;->unboundedRipple:Z
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
move-object p1, v1
|
|
|
|
:cond_2
|
|
if-eqz v4, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
move-object v1, v0
|
|
|
|
:goto_1
|
|
invoke-direct {v3, v2, p1, v1}, Landroid/graphics/drawable/RippleDrawable;-><init>(Landroid/content/res/ColorStateList;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
|
|
|
|
move-object p1, v3
|
|
|
|
.line 15
|
|
:cond_4
|
|
invoke-static {p0, p1}, Landroidx/core/view/ViewCompat;->I1(Landroid/view/View;Landroid/graphics/drawable/Drawable;)V
|
|
|
|
.line 16
|
|
iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/HorizontalScrollView;->invalidate()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateTextAndIcon(Landroid/widget/TextView;Landroid/widget/ImageView;)V
|
|
.locals 7
|
|
.param p1 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/widget/ImageView;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
.line 3
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ld1/c;->r(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
.line 4
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v2}, Lcom/google/android/material/tabs/TabLayout$Tab;->getText()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object v2, v1
|
|
|
|
:goto_1
|
|
const/16 v3, 0x8
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 5
|
|
invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
.line 6
|
|
invoke-virtual {p2, v4}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
.line 7
|
|
invoke-virtual {p0, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 8
|
|
:cond_2
|
|
invoke-virtual {p2, v3}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
.line 9
|
|
invoke-virtual {p2, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
.line 10
|
|
:cond_3
|
|
:goto_2
|
|
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
xor-int/2addr v0, v5
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 11
|
|
invoke-virtual {p1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
.line 12
|
|
iget-object v6, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
invoke-static {v6}, Lcom/google/android/material/tabs/TabLayout$Tab;->access$1100(Lcom/google/android/material/tabs/TabLayout$Tab;)I
|
|
|
|
move-result v6
|
|
|
|
if-ne v6, v5, :cond_4
|
|
|
|
.line 13
|
|
invoke-virtual {p1, v4}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
goto :goto_3
|
|
|
|
.line 14
|
|
:cond_4
|
|
invoke-virtual {p1, v3}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
.line 15
|
|
:goto_3
|
|
invoke-virtual {p0, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V
|
|
|
|
goto :goto_4
|
|
|
|
.line 16
|
|
:cond_5
|
|
invoke-virtual {p1, v3}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
.line 17
|
|
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_6
|
|
:goto_4
|
|
if-eqz p2, :cond_9
|
|
|
|
.line 18
|
|
invoke-virtual {p2}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/view/ViewGroup$MarginLayoutParams;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 19
|
|
invoke-virtual {p2}, Landroid/widget/ImageView;->getVisibility()I
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_7
|
|
|
|
.line 20
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v5, v3}, Lcom/google/android/material/internal/ViewUtils;->dpToPx(Landroid/content/Context;I)F
|
|
|
|
move-result v3
|
|
|
|
float-to-int v3, v3
|
|
|
|
goto :goto_5
|
|
|
|
:cond_7
|
|
move v3, v4
|
|
|
|
.line 21
|
|
:goto_5
|
|
iget-object v5, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-boolean v5, v5, Lcom/google/android/material/tabs/TabLayout;->inlineLabel:Z
|
|
|
|
if-eqz v5, :cond_8
|
|
|
|
.line 22
|
|
invoke-static {p1}, Ls1/m;->b(Landroid/view/ViewGroup$MarginLayoutParams;)I
|
|
|
|
move-result v5
|
|
|
|
if-eq v3, v5, :cond_9
|
|
|
|
.line 23
|
|
invoke-static {p1, v3}, Ls1/m;->g(Landroid/view/ViewGroup$MarginLayoutParams;I)V
|
|
|
|
.line 24
|
|
iput v4, p1, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I
|
|
|
|
.line 25
|
|
invoke-virtual {p2, p1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
.line 26
|
|
invoke-virtual {p2}, Landroid/widget/ImageView;->requestLayout()V
|
|
|
|
goto :goto_6
|
|
|
|
.line 27
|
|
:cond_8
|
|
iget v5, p1, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I
|
|
|
|
if-eq v3, v5, :cond_9
|
|
|
|
.line 28
|
|
iput v3, p1, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I
|
|
|
|
.line 29
|
|
invoke-static {p1, v4}, Ls1/m;->g(Landroid/view/ViewGroup$MarginLayoutParams;I)V
|
|
|
|
.line 30
|
|
invoke-virtual {p2, p1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
.line 31
|
|
invoke-virtual {p2}, Landroid/widget/ImageView;->requestLayout()V
|
|
|
|
.line 32
|
|
:cond_9
|
|
:goto_6
|
|
iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
invoke-static {p1}, Lcom/google/android/material/tabs/TabLayout$Tab;->access$200(Lcom/google/android/material/tabs/TabLayout$Tab;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_a
|
|
if-eqz v0, :cond_b
|
|
|
|
goto :goto_7
|
|
|
|
:cond_b
|
|
move-object v2, v1
|
|
|
|
.line 33
|
|
:goto_7
|
|
invoke-static {p0, v2}, Landroidx/appcompat/widget/l0;->a(Landroid/view/View;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public drawableStateChanged()V
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-super {p0}, Landroid/widget/LinearLayout;->drawableStateChanged()V
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getDrawableState()[I
|
|
|
|
move-result-object v0
|
|
|
|
.line 3
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 4
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->baseBackgroundDrawable:Landroid/graphics/drawable/Drawable;
|
|
|
|
invoke-virtual {v1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
move-result v0
|
|
|
|
or-int/2addr v2, v0
|
|
|
|
:cond_0
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->invalidate()V
|
|
|
|
.line 6
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/HorizontalScrollView;->invalidate()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContentHeight()I
|
|
.locals 9
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v1, v0, [Landroid/view/View;
|
|
|
|
.line 1
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
const/4 v4, 0x1
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
const/4 v5, 0x2
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
move v2, v3
|
|
|
|
move v5, v2
|
|
|
|
move v6, v5
|
|
|
|
:goto_0
|
|
if-ge v3, v0, :cond_3
|
|
|
|
aget-object v7, v1, v3
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
.line 2
|
|
invoke-virtual {v7}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_2
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {v7}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v8
|
|
|
|
invoke-static {v5, v8}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {v7}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v5
|
|
|
|
:goto_1
|
|
if-eqz v6, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {v7}, Landroid/view/View;->getBottom()I
|
|
|
|
move-result v6
|
|
|
|
invoke-static {v2, v6}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
invoke-virtual {v7}, Landroid/view/View;->getBottom()I
|
|
|
|
move-result v2
|
|
|
|
:goto_2
|
|
move v6, v4
|
|
|
|
:cond_2
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
sub-int/2addr v2, v5
|
|
|
|
return v2
|
|
.end method
|
|
|
|
.method public getContentWidth()I
|
|
.locals 9
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v1, v0, [Landroid/view/View;
|
|
|
|
.line 1
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
const/4 v4, 0x1
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
const/4 v5, 0x2
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
move v2, v3
|
|
|
|
move v5, v2
|
|
|
|
move v6, v5
|
|
|
|
:goto_0
|
|
if-ge v3, v0, :cond_3
|
|
|
|
aget-object v7, v1, v3
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
.line 2
|
|
invoke-virtual {v7}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v8
|
|
|
|
if-nez v8, :cond_2
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {v7}, Landroid/view/View;->getLeft()I
|
|
|
|
move-result v8
|
|
|
|
invoke-static {v5, v8}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {v7}, Landroid/view/View;->getLeft()I
|
|
|
|
move-result v5
|
|
|
|
:goto_1
|
|
if-eqz v6, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {v7}, Landroid/view/View;->getRight()I
|
|
|
|
move-result v6
|
|
|
|
invoke-static {v2, v6}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
invoke-virtual {v7}, Landroid/view/View;->getRight()I
|
|
|
|
move-result v2
|
|
|
|
:goto_2
|
|
move v6, v4
|
|
|
|
:cond_2
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
sub-int/2addr v2, v5
|
|
|
|
return v2
|
|
.end method
|
|
|
|
.method public getTab()Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
|
|
.locals 6
|
|
.param p1 # Landroid/view/accessibility/AccessibilityNodeInfo;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->isVisible()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContentDescription()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
.line 4
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ", "
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->badgeDrawable:Lcom/google/android/material/badge/BadgeDrawable;
|
|
|
|
.line 5
|
|
invoke-virtual {v0}, Lcom/google/android/material/badge/BadgeDrawable;->getContentDescription()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 6
|
|
invoke-virtual {p1, v0}, Landroid/view/accessibility/AccessibilityNodeInfo;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
.line 7
|
|
:cond_0
|
|
invoke-static {p1}, Lt1/c;->V1(Landroid/view/accessibility/AccessibilityNodeInfo;)Lt1/c;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 8
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
.line 9
|
|
invoke-virtual {v2}, Lcom/google/android/material/tabs/TabLayout$Tab;->getPosition()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
.line 10
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->isSelected()Z
|
|
|
|
move-result v5
|
|
|
|
.line 11
|
|
invoke-static/range {v0 .. v5}, Lt1/c$c;->h(IIIIZZ)Lt1/c$c;
|
|
|
|
move-result-object v0
|
|
|
|
.line 12
|
|
invoke-virtual {p1, v0}, Lt1/c;->X0(Ljava/lang/Object;)V
|
|
|
|
.line 13
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->isSelected()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 14
|
|
invoke-virtual {p1, v0}, Lt1/c;->V0(Z)V
|
|
|
|
.line 15
|
|
sget-object v0, Lt1/c$a;->j:Lt1/c$a;
|
|
|
|
invoke-virtual {p1, v0}, Lt1/c;->J0(Lt1/c$a;)Z
|
|
|
|
.line 16
|
|
:cond_1
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Lcom/google/android/material/R$string;->item_view_role_description:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lt1/c;->B1(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onMeasure(II)V
|
|
.locals 7
|
|
|
|
.line 1
|
|
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
|
|
|
|
move-result v0
|
|
|
|
.line 2
|
|
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I
|
|
|
|
move-result v1
|
|
|
|
.line 3
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
invoke-virtual {v2}, Lcom/google/android/material/tabs/TabLayout;->getTabMaxWidth()I
|
|
|
|
move-result v2
|
|
|
|
if-lez v2, :cond_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
if-le v0, v2, :cond_1
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget p1, p1, Lcom/google/android/material/tabs/TabLayout;->tabMaxWidth:I
|
|
|
|
const/high16 v0, -0x80000000
|
|
|
|
invoke-static {p1, v0}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result p1
|
|
|
|
.line 5
|
|
:cond_1
|
|
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
|
|
|
.line 6
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 7
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabTextSize:F
|
|
|
|
.line 8
|
|
iget v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->defaultMaxLines:I
|
|
|
|
.line 9
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v2}, Landroid/widget/ImageView;->getVisibility()I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
move v1, v3
|
|
|
|
goto :goto_0
|
|
|
|
.line 10
|
|
:cond_2
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-virtual {v2}, Landroid/widget/TextView;->getLineCount()I
|
|
|
|
move-result v2
|
|
|
|
if-le v2, v3, :cond_3
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabTextMultiLineSize:F
|
|
|
|
.line 12
|
|
:cond_3
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/TextView;->getTextSize()F
|
|
|
|
move-result v2
|
|
|
|
.line 13
|
|
iget-object v4, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v4}, Landroid/widget/TextView;->getLineCount()I
|
|
|
|
move-result v4
|
|
|
|
.line 14
|
|
iget-object v5, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-static {v5}, Landroidx/core/widget/TextViewCompat;->k(Landroid/widget/TextView;)I
|
|
|
|
move-result v5
|
|
|
|
cmpl-float v2, v0, v2
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
if-ltz v5, :cond_7
|
|
|
|
if-eq v1, v5, :cond_7
|
|
|
|
.line 15
|
|
:cond_4
|
|
iget-object v5, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget v5, v5, Lcom/google/android/material/tabs/TabLayout;->mode:I
|
|
|
|
const/4 v6, 0x0
|
|
|
|
if-ne v5, v3, :cond_6
|
|
|
|
if-lez v2, :cond_6
|
|
|
|
if-ne v4, v3, :cond_6
|
|
|
|
.line 16
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/TextView;->getLayout()Landroid/text/Layout;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
.line 17
|
|
invoke-direct {p0, v2, v6, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->approximateLineWidth(Landroid/text/Layout;IF)F
|
|
|
|
move-result v2
|
|
|
|
.line 18
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getMeasuredWidth()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getPaddingLeft()I
|
|
|
|
move-result v5
|
|
|
|
sub-int/2addr v4, v5
|
|
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getPaddingRight()I
|
|
|
|
move-result v5
|
|
|
|
sub-int/2addr v4, v5
|
|
|
|
int-to-float v4, v4
|
|
|
|
cmpl-float v2, v2, v4
|
|
|
|
if-lez v2, :cond_6
|
|
|
|
:cond_5
|
|
move v3, v6
|
|
|
|
:cond_6
|
|
if-eqz v3, :cond_7
|
|
|
|
.line 19
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v2, v6, v0}, Landroid/widget/TextView;->setTextSize(IF)V
|
|
|
|
.line 20
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setMaxLines(I)V
|
|
|
|
.line 21
|
|
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
|
|
|
:cond_7
|
|
return-void
|
|
.end method
|
|
|
|
.method public performClick()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-super {p0}, Landroid/widget/LinearLayout;->performClick()Z
|
|
|
|
move-result v0
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 3
|
|
invoke-virtual {p0, v0}, Landroid/widget/LinearLayout;->playSoundEffect(I)V
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->select()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public reset()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->setTab(Lcom/google/android/material/tabs/TabLayout$Tab;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->setSelected(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setSelected(Z)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->isSelected()Z
|
|
|
|
move-result v0
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
:goto_0
|
|
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->setSelected(Z)V
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 4
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setSelected(Z)V
|
|
|
|
.line 5
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 6
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setSelected(Z)V
|
|
|
|
.line 7
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 8
|
|
invoke-virtual {v0, p1}, Landroid/view/View;->setSelected(Z)V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTab(Lcom/google/android/material/tabs/TabLayout$Tab;)V
|
|
.locals 1
|
|
.param p1 # Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->update()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final update()V
|
|
.locals 5
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->tab:Lcom/google/android/material/tabs/TabLayout$Tab;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getCustomView()Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v2, v1
|
|
|
|
:goto_0
|
|
if-eqz v2, :cond_6
|
|
|
|
.line 3
|
|
invoke-virtual {v2}, Landroid/view/View;->getParent()Landroid/view/ViewParent;
|
|
|
|
move-result-object v3
|
|
|
|
if-eq v3, p0, :cond_2
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 4
|
|
check-cast v3, Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {v3, v2}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
|
|
|
|
.line 5
|
|
:cond_1
|
|
invoke-virtual {p0, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V
|
|
|
|
.line 6
|
|
:cond_2
|
|
iput-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
.line 7
|
|
iget-object v3, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
const/16 v4, 0x8
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
.line 8
|
|
invoke-virtual {v3, v4}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
.line 9
|
|
:cond_3
|
|
iget-object v3, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
.line 10
|
|
invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setVisibility(I)V
|
|
|
|
.line 11
|
|
iget-object v3, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {v3, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_4
|
|
const v3, 0x1020014
|
|
|
|
.line 12
|
|
invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Landroid/widget/TextView;
|
|
|
|
iput-object v3, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customTextView:Landroid/widget/TextView;
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
.line 13
|
|
invoke-static {v3}, Landroidx/core/widget/TextViewCompat;->k(Landroid/widget/TextView;)I
|
|
|
|
move-result v3
|
|
|
|
iput v3, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->defaultMaxLines:I
|
|
|
|
:cond_5
|
|
const v3, 0x1020006
|
|
|
|
.line 14
|
|
invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/widget/ImageView;
|
|
|
|
iput-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customIconView:Landroid/widget/ImageView;
|
|
|
|
goto :goto_1
|
|
|
|
.line 15
|
|
:cond_6
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
.line 16
|
|
invoke-virtual {p0, v2}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V
|
|
|
|
.line 17
|
|
iput-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
.line 18
|
|
:cond_7
|
|
iput-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customTextView:Landroid/widget/TextView;
|
|
|
|
.line 19
|
|
iput-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customIconView:Landroid/widget/ImageView;
|
|
|
|
.line 20
|
|
:goto_1
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customView:Landroid/view/View;
|
|
|
|
if-nez v2, :cond_d
|
|
|
|
.line 21
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
if-nez v2, :cond_8
|
|
|
|
.line 22
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->inflateAndAddDefaultIconView()V
|
|
|
|
:cond_8
|
|
if-eqz v0, :cond_9
|
|
|
|
.line 23
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_9
|
|
|
|
.line 24
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->getIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Ld1/c;->r(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_9
|
|
if-eqz v1, :cond_a
|
|
|
|
.line 25
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-object v2, v2, Lcom/google/android/material/tabs/TabLayout;->tabIconTint:Landroid/content/res/ColorStateList;
|
|
|
|
invoke-static {v1, v2}, Ld1/c;->o(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V
|
|
|
|
.line 26
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-object v2, v2, Lcom/google/android/material/tabs/TabLayout;->tabIconTintMode:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
if-eqz v2, :cond_a
|
|
|
|
.line 27
|
|
invoke-static {v1, v2}, Ld1/c;->p(Landroid/graphics/drawable/Drawable;Landroid/graphics/PorterDuff$Mode;)V
|
|
|
|
.line 28
|
|
:cond_a
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
if-nez v1, :cond_b
|
|
|
|
.line 29
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->inflateAndAddDefaultTextView()V
|
|
|
|
.line 30
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-static {v1}, Landroidx/core/widget/TextViewCompat;->k(Landroid/widget/TextView;)I
|
|
|
|
move-result v1
|
|
|
|
iput v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->defaultMaxLines:I
|
|
|
|
.line 31
|
|
:cond_b
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget v2, v2, Lcom/google/android/material/tabs/TabLayout;->tabTextAppearance:I
|
|
|
|
invoke-static {v1, v2}, Landroidx/core/widget/TextViewCompat;->E(Landroid/widget/TextView;I)V
|
|
|
|
.line 32
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-object v1, v1, Lcom/google/android/material/tabs/TabLayout;->tabTextColors:Landroid/content/res/ColorStateList;
|
|
|
|
if-eqz v1, :cond_c
|
|
|
|
.line 33
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setTextColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
.line 34
|
|
:cond_c
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
invoke-direct {p0, v1, v2}, Lcom/google/android/material/tabs/TabLayout$TabView;->updateTextAndIcon(Landroid/widget/TextView;Landroid/widget/ImageView;)V
|
|
|
|
.line 35
|
|
invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$TabView;->tryUpdateBadgeAnchor()V
|
|
|
|
.line 36
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
invoke-direct {p0, v1}, Lcom/google/android/material/tabs/TabLayout$TabView;->addOnLayoutChangeListener(Landroid/view/View;)V
|
|
|
|
.line 37
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
invoke-direct {p0, v1}, Lcom/google/android/material/tabs/TabLayout$TabView;->addOnLayoutChangeListener(Landroid/view/View;)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 38
|
|
:cond_d
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customTextView:Landroid/widget/TextView;
|
|
|
|
if-nez v1, :cond_e
|
|
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customIconView:Landroid/widget/ImageView;
|
|
|
|
if-eqz v2, :cond_f
|
|
|
|
.line 39
|
|
:cond_e
|
|
iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customIconView:Landroid/widget/ImageView;
|
|
|
|
invoke-direct {p0, v1, v2}, Lcom/google/android/material/tabs/TabLayout$TabView;->updateTextAndIcon(Landroid/widget/TextView;Landroid/widget/ImageView;)V
|
|
|
|
:cond_f
|
|
:goto_2
|
|
if-eqz v0, :cond_10
|
|
|
|
.line 40
|
|
invoke-static {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->access$200(Lcom/google/android/material/tabs/TabLayout$Tab;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_10
|
|
|
|
.line 41
|
|
invoke-static {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->access$200(Lcom/google/android/material/tabs/TabLayout$Tab;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0, v1}, Landroid/widget/LinearLayout;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_10
|
|
if-eqz v0, :cond_11
|
|
|
|
.line 42
|
|
invoke-virtual {v0}, Lcom/google/android/material/tabs/TabLayout$Tab;->isSelected()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_11
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_11
|
|
const/4 v0, 0x0
|
|
|
|
:goto_3
|
|
invoke-virtual {p0, v0}, Lcom/google/android/material/tabs/TabLayout$TabView;->setSelected(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final updateOrientation()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->this$0:Lcom/google/android/material/tabs/TabLayout;
|
|
|
|
iget-boolean v0, v0, Lcom/google/android/material/tabs/TabLayout;->inlineLabel:Z
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
invoke-virtual {p0, v0}, Landroid/widget/LinearLayout;->setOrientation(I)V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customTextView:Landroid/widget/TextView;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customIconView:Landroid/widget/ImageView;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->textView:Landroid/widget/TextView;
|
|
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->iconView:Landroid/widget/ImageView;
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/google/android/material/tabs/TabLayout$TabView;->updateTextAndIcon(Landroid/widget/TextView;Landroid/widget/ImageView;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 4
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$TabView;->customIconView:Landroid/widget/ImageView;
|
|
|
|
invoke-direct {p0, v0, v1}, Lcom/google/android/material/tabs/TabLayout$TabView;->updateTextAndIcon(Landroid/widget/TextView;Landroid/widget/ImageView;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|