814 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			814 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;
 | |
| .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 = 0x1
 | |
|     name = "SlidingTabIndicator"
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
| .field private layoutDirection:I
 | |
| 
 | |
| .field public selectedPosition:I
 | |
| 
 | |
| .field public selectionOffset:F
 | |
| 
 | |
| .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 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
 | |
| 
 | |
|     const/4 p1, -0x1
 | |
| 
 | |
|     .line 3
 | |
|     iput p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     .line 4
 | |
|     iput p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->layoutDirection:I
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0, p1}, Landroid/widget/LinearLayout;->setWillNotDraw(Z)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$1300(Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;Landroid/view/View;Landroid/view/View;F)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1, p2, p3}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->tweenIndicatorPosition(Landroid/view/View;Landroid/view/View;F)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private jumpIndicatorToSelectedPosition()V
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     iget v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     invoke-virtual {p0, v0}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     invoke-static {v1}, Lcom/google/android/material/tabs/TabLayout;->access$1200(Lcom/google/android/material/tabs/TabLayout;)Lcom/google/android/material/tabs/TabIndicatorInterpolator;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v3, v2, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v1, v2, v0, v3}, Lcom/google/android/material/tabs/TabIndicatorInterpolator;->setIndicatorBoundsForTab(Lcom/google/android/material/tabs/TabLayout;Landroid/view/View;Landroid/graphics/drawable/Drawable;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private tweenIndicatorPosition(Landroid/view/View;Landroid/view/View;F)V
 | |
|     .locals 7
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1}, Landroid/view/View;->getWidth()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-lez v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/android/material/tabs/TabLayout;->access$1200(Lcom/google/android/material/tabs/TabLayout;)Lcom/google/android/material/tabs/TabIndicatorInterpolator;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     iget-object v2, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v6, v2, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     move-object v3, p1
 | |
| 
 | |
|     move-object v4, p2
 | |
| 
 | |
|     move v5, p3
 | |
| 
 | |
|     invoke-virtual/range {v1 .. v6}, Lcom/google/android/material/tabs/TabIndicatorInterpolator;->setIndicatorBoundsForOffset(Lcom/google/android/material/tabs/TabLayout;Landroid/view/View;Landroid/view/View;FLandroid/graphics/drawable/Drawable;)V
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 3
 | |
|     :cond_1
 | |
|     iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object p1, p1, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     iget p2, p2, Landroid/graphics/Rect;->top:I
 | |
| 
 | |
|     iget-object p3, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object p3, p3, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {p3}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     iget p3, p3, Landroid/graphics/Rect;->bottom:I
 | |
| 
 | |
|     const/4 v0, -0x1
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1, v0, p2, v0, p3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
 | |
| 
 | |
|     .line 6
 | |
|     :goto_1
 | |
|     invoke-static {p0}, Landroidx/core/view/ViewCompat;->n1(Landroid/view/View;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private updateOrRecreateIndicatorAnimation(ZII)V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     iget v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     invoke-virtual {p0, v0}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, p2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     if-nez v1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->jumpIndicatorToSelectedPosition()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     new-instance v2, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator$1;
 | |
| 
 | |
|     invoke-direct {v2, p0, v0, v1}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator$1;-><init>(Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;Landroid/view/View;Landroid/view/View;)V
 | |
| 
 | |
|     if-eqz p1, :cond_1
 | |
| 
 | |
|     .line 5
 | |
|     new-instance p1, Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     invoke-direct {p1}, Landroid/animation/ValueAnimator;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     .line 6
 | |
|     sget-object v0, Lcom/google/android/material/animation/AnimationUtils;->FAST_OUT_SLOW_IN_INTERPOLATOR:Landroid/animation/TimeInterpolator;
 | |
| 
 | |
|     invoke-virtual {p1, v0}, Landroid/animation/ValueAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)V
 | |
| 
 | |
|     int-to-long v0, p3
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p1, v0, v1}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     const/4 p3, 0x2
 | |
| 
 | |
|     new-array p3, p3, [F
 | |
| 
 | |
|     .line 8
 | |
|     fill-array-data p3, :array_0
 | |
| 
 | |
|     invoke-virtual {p1, p3}, Landroid/animation/ValueAnimator;->setFloatValues([F)V
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {p1, v2}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
 | |
| 
 | |
|     .line 10
 | |
|     new-instance p3, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator$2;
 | |
| 
 | |
|     invoke-direct {p3, p0, p2}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator$2;-><init>(Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;I)V
 | |
| 
 | |
|     invoke-virtual {p1, p3}, Landroid/animation/ValueAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
 | |
| 
 | |
|     .line 11
 | |
|     invoke-virtual {p1}, Landroid/animation/ValueAnimator;->start()V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 12
 | |
|     :cond_1
 | |
|     iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     invoke-virtual {p1}, Landroid/animation/ValueAnimator;->removeAllUpdateListeners()V
 | |
| 
 | |
|     .line 13
 | |
|     iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     invoke-virtual {p1, v2}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| 
 | |
|     :array_0
 | |
|     .array-data 4
 | |
|         0x0
 | |
|         0x3f800000    # 1.0f
 | |
|     .end array-data
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public animateIndicatorToPosition(II)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/animation/ValueAnimator;->isRunning()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-direct {p0, v0, p1, p2}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->updateOrRecreateIndicatorAnimation(ZII)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public childrenNeedLayout()Z
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getChildCount()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     :goto_0
 | |
|     if-ge v2, v0, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {v3}, Landroid/view/View;->getWidth()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     if-gtz v3, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     return v0
 | |
| 
 | |
|     :cond_0
 | |
|     add-int/lit8 v2, v2, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     return v1
 | |
| .end method
 | |
| 
 | |
| .method public draw(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$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/graphics/Rect;->height()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-gez v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget v1, v1, Lcom/google/android/material/tabs/TabLayout;->tabIndicatorGravity:I
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     if-eqz v1, :cond_3
 | |
| 
 | |
|     const/4 v3, 0x1
 | |
| 
 | |
|     const/4 v4, 0x2
 | |
| 
 | |
|     if-eq v1, v3, :cond_2
 | |
| 
 | |
|     if-eq v1, v4, :cond_4
 | |
| 
 | |
|     const/4 v0, 0x3
 | |
| 
 | |
|     if-eq v1, v0, :cond_1
 | |
| 
 | |
|     move v0, v2
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_1
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_2
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     sub-int/2addr v1, v0
 | |
| 
 | |
|     div-int/lit8 v2, v1, 0x2
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     add-int/2addr v1, v0
 | |
| 
 | |
|     div-int/lit8 v0, v1, 0x2
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 7
 | |
|     :cond_3
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     sub-int v2, v1, v0
 | |
| 
 | |
|     .line 8
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     .line 9
 | |
|     :cond_4
 | |
|     :goto_0
 | |
|     iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v1, v1, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-virtual {v1}, Landroid/graphics/Rect;->width()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-lez v1, :cond_6
 | |
| 
 | |
|     .line 10
 | |
|     iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v1, v1, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     .line 11
 | |
|     iget-object v3, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v3, v3, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     iget v4, v1, Landroid/graphics/Rect;->left:I
 | |
| 
 | |
|     iget v1, v1, Landroid/graphics/Rect;->right:I
 | |
| 
 | |
|     invoke-virtual {v3, v4, v2, v1, v0}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
 | |
| 
 | |
|     .line 12
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v1, v0, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     .line 13
 | |
|     invoke-static {v0}, Lcom/google/android/material/tabs/TabLayout;->access$1400(Lcom/google/android/material/tabs/TabLayout;)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_5
 | |
| 
 | |
|     .line 14
 | |
|     invoke-static {v1}, Ld1/c;->r(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     .line 15
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/android/material/tabs/TabLayout;->access$1400(Lcom/google/android/material/tabs/TabLayout;)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {v1, v0}, Ld1/c;->n(Landroid/graphics/drawable/Drawable;I)V
 | |
| 
 | |
|     .line 16
 | |
|     :cond_5
 | |
|     invoke-virtual {v1, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
 | |
| 
 | |
|     .line 17
 | |
|     :cond_6
 | |
|     invoke-super {p0, p1}, Landroid/widget/LinearLayout;->draw(Landroid/graphics/Canvas;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public getIndicatorPosition()F
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     int-to-float v0, v0
 | |
| 
 | |
|     iget v1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectionOffset:F
 | |
| 
 | |
|     add-float/2addr v0, v1
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public onLayout(ZIIII)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-super/range {p0 .. p5}, Landroid/widget/LinearLayout;->onLayout(ZIIII)V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     invoke-virtual {p1}, Landroid/animation/ValueAnimator;->isRunning()Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     .line 3
 | |
|     iget p2, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     const/4 p3, -0x1
 | |
| 
 | |
|     invoke-direct {p0, p1, p2, p3}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->updateOrRecreateIndicatorAnimation(ZII)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-direct {p0}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->jumpIndicatorToSelectedPosition()V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onMeasure(II)V
 | |
|     .locals 8
 | |
| 
 | |
|     .line 1
 | |
|     invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/high16 v1, 0x40000000    # 2.0f
 | |
| 
 | |
|     if-eq v0, v1, :cond_0
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget v1, v0, Lcom/google/android/material/tabs/TabLayout;->tabGravity:I
 | |
| 
 | |
|     const/4 v2, 0x2
 | |
| 
 | |
|     const/4 v3, 0x1
 | |
| 
 | |
|     if-eq v1, v3, :cond_1
 | |
| 
 | |
|     iget v0, v0, Lcom/google/android/material/tabs/TabLayout;->mode:I
 | |
| 
 | |
|     if-ne v0, v2, :cond_9
 | |
| 
 | |
|     .line 4
 | |
|     :cond_1
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getChildCount()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     move v4, v1
 | |
| 
 | |
|     move v5, v4
 | |
| 
 | |
|     :goto_0
 | |
|     if-ge v4, v0, :cond_3
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0, v4}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v6
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {v6}, Landroid/view/View;->getVisibility()I
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     if-nez v7, :cond_2
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {v6}, Landroid/view/View;->getMeasuredWidth()I
 | |
| 
 | |
|     move-result v6
 | |
| 
 | |
|     invoke-static {v5, v6}, Ljava/lang/Math;->max(II)I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     :cond_2
 | |
|     add-int/lit8 v4, v4, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_3
 | |
|     if-gtz v5, :cond_4
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 8
 | |
|     :cond_4
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     const/16 v6, 0x10
 | |
| 
 | |
|     invoke-static {v4, v6}, Lcom/google/android/material/internal/ViewUtils;->dpToPx(Landroid/content/Context;I)F
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     float-to-int v4, v4
 | |
| 
 | |
|     mul-int v6, v5, v0
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->getMeasuredWidth()I
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     mul-int/2addr v4, v2
 | |
| 
 | |
|     sub-int/2addr v7, v4
 | |
| 
 | |
|     if-gt v6, v7, :cond_8
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     :goto_1
 | |
|     if-ge v1, v0, :cond_7
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     check-cast v4, Landroid/widget/LinearLayout$LayoutParams;
 | |
| 
 | |
|     .line 11
 | |
|     iget v6, v4, Landroid/widget/LinearLayout$LayoutParams;->width:I
 | |
| 
 | |
|     const/4 v7, 0x0
 | |
| 
 | |
|     if-ne v6, v5, :cond_5
 | |
| 
 | |
|     iget v6, v4, Landroid/widget/LinearLayout$LayoutParams;->weight:F
 | |
| 
 | |
|     cmpl-float v6, v6, v7
 | |
| 
 | |
|     if-eqz v6, :cond_6
 | |
| 
 | |
|     .line 12
 | |
|     :cond_5
 | |
|     iput v5, v4, Landroid/widget/LinearLayout$LayoutParams;->width:I
 | |
| 
 | |
|     .line 13
 | |
|     iput v7, v4, Landroid/widget/LinearLayout$LayoutParams;->weight:F
 | |
| 
 | |
|     move v2, v3
 | |
| 
 | |
|     :cond_6
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_7
 | |
|     move v3, v2
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     .line 14
 | |
|     :cond_8
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iput v1, v0, Lcom/google/android/material/tabs/TabLayout;->tabGravity:I
 | |
| 
 | |
|     .line 15
 | |
|     invoke-virtual {v0, v1}, Lcom/google/android/material/tabs/TabLayout;->updateTabViews(Z)V
 | |
| 
 | |
|     :goto_2
 | |
|     if-eqz v3, :cond_9
 | |
| 
 | |
|     .line 16
 | |
|     invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
 | |
| 
 | |
|     :cond_9
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onRtlPropertiesChanged(I)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onRtlPropertiesChanged(I)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setIndicatorPositionFromTabPosition(IF)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/animation/ValueAnimator;->isRunning()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->indicatorAnimator:Landroid/animation/ValueAnimator;
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/animation/ValueAnimator;->cancel()V
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     iput p1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     .line 4
 | |
|     iput p2, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectionOffset:F
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0, p1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 6
 | |
|     iget p2, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectedPosition:I
 | |
| 
 | |
|     add-int/lit8 p2, p2, 0x1
 | |
| 
 | |
|     invoke-virtual {p0, p2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     .line 7
 | |
|     iget v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->selectionOffset:F
 | |
| 
 | |
|     invoke-direct {p0, p1, p2, v0}, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->tweenIndicatorPosition(Landroid/view/View;Landroid/view/View;F)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setSelectedIndicatorHeight(I)V
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v0, v0, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v1, p0, Lcom/google/android/material/tabs/TabLayout$SlidingTabIndicator;->this$0:Lcom/google/android/material/tabs/TabLayout;
 | |
| 
 | |
|     iget-object v1, v1, Lcom/google/android/material/tabs/TabLayout;->tabSelectedIndicator:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     iget v2, v0, Landroid/graphics/Rect;->left:I
 | |
| 
 | |
|     iget v0, v0, Landroid/graphics/Rect;->right:I
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     invoke-virtual {v1, v2, v3, v0, p1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Landroid/widget/LinearLayout;->requestLayout()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 |