492 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			492 lines
		
	
	
		
			11 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Landroidx/recyclerview/widget/l;
 | |
| .super Landroidx/recyclerview/widget/RecyclerView$l;
 | |
| .source "DividerItemDecoration.java"
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field public static final d:I = 0x0
 | |
| 
 | |
| .field public static final e:I = 0x1
 | |
| 
 | |
| .field public static final f:Ljava/lang/String; = "DividerItem"
 | |
| 
 | |
| .field public static final g:[I
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
| .field public b:I
 | |
| 
 | |
| .field public final c:Landroid/graphics/Rect;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public static constructor <clinit>()V
 | |
|     .locals 3
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     new-array v0, v0, [I
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     const v2, 0x1010214
 | |
| 
 | |
|     aput v2, v0, v1
 | |
| 
 | |
|     .line 1
 | |
|     sput-object v0, Landroidx/recyclerview/widget/l;->g:[I
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Landroid/content/Context;I)V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$l;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
 | |
| 
 | |
|     iput-object v0, p0, Landroidx/recyclerview/widget/l;->c:Landroid/graphics/Rect;
 | |
| 
 | |
|     .line 3
 | |
|     sget-object v0, Landroidx/recyclerview/widget/l;->g:[I
 | |
| 
 | |
|     invoke-virtual {p1, v0}, Landroid/content/Context;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     const-string v0, "DividerItem"
 | |
| 
 | |
|     const-string v1, "@android:attr/listDivider was not set in the theme used for this DividerItemDecoration. Please set that attribute all call setDrawable()"
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
 | |
| 
 | |
|     .line 6
 | |
|     :cond_0
 | |
|     invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p0, p2}, Landroidx/recyclerview/widget/l;->j(I)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public final f(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;)V
 | |
|     .locals 7
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView;->getClipToPadding()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingTop()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getHeight()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingBottom()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     sub-int/2addr v2, v3
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingLeft()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getWidth()I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingRight()I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     sub-int/2addr v4, v5
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p1, v3, v0, v4, v2}, Landroid/graphics/Canvas;->clipRect(IIII)Z
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 8
 | |
|     :cond_0
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getHeight()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     move v0, v1
 | |
| 
 | |
|     .line 9
 | |
|     :goto_0
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getChildCount()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     :goto_1
 | |
|     if-ge v1, v3, :cond_1
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p2, v1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     .line 11
 | |
|     invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$m;
 | |
| 
 | |
|     move-result-object v5
 | |
| 
 | |
|     iget-object v6, p0, Landroidx/recyclerview/widget/l;->c:Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-virtual {v5, v4, v6}, Landroidx/recyclerview/widget/RecyclerView$m;->getDecoratedBoundsWithMargins(Landroid/view/View;Landroid/graphics/Rect;)V
 | |
| 
 | |
|     .line 12
 | |
|     iget-object v5, p0, Landroidx/recyclerview/widget/l;->c:Landroid/graphics/Rect;
 | |
| 
 | |
|     iget v5, v5, Landroid/graphics/Rect;->right:I
 | |
| 
 | |
|     invoke-virtual {v4}, Landroid/view/View;->getTranslationX()F
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     invoke-static {v4}, Ljava/lang/Math;->round(F)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     add-int/2addr v4, v5
 | |
| 
 | |
|     .line 13
 | |
|     iget-object v5, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v5}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     sub-int v5, v4, v5
 | |
| 
 | |
|     .line 14
 | |
|     iget-object v6, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v6, v5, v0, v4, v2}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
 | |
| 
 | |
|     .line 15
 | |
|     iget-object v4, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v4, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
 | |
| 
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 16
 | |
|     :cond_1
 | |
|     invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public final g(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;)V
 | |
|     .locals 7
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView;->getClipToPadding()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingLeft()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getWidth()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingRight()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     sub-int/2addr v2, v3
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingTop()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getHeight()I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getPaddingBottom()I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     sub-int/2addr v4, v5
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p1, v0, v3, v2, v4}, Landroid/graphics/Canvas;->clipRect(IIII)Z
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 8
 | |
|     :cond_0
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getWidth()I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     move v0, v1
 | |
| 
 | |
|     .line 9
 | |
|     :goto_0
 | |
|     invoke-virtual {p2}, Landroid/view/ViewGroup;->getChildCount()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     :goto_1
 | |
|     if-ge v1, v3, :cond_1
 | |
| 
 | |
|     .line 10
 | |
|     invoke-virtual {p2, v1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     .line 11
 | |
|     iget-object v5, p0, Landroidx/recyclerview/widget/l;->c:Landroid/graphics/Rect;
 | |
| 
 | |
|     invoke-virtual {p2, v4, v5}, Landroidx/recyclerview/widget/RecyclerView;->getDecoratedBoundsWithMargins(Landroid/view/View;Landroid/graphics/Rect;)V
 | |
| 
 | |
|     .line 12
 | |
|     iget-object v5, p0, Landroidx/recyclerview/widget/l;->c:Landroid/graphics/Rect;
 | |
| 
 | |
|     iget v5, v5, Landroid/graphics/Rect;->bottom:I
 | |
| 
 | |
|     invoke-virtual {v4}, Landroid/view/View;->getTranslationY()F
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     invoke-static {v4}, Ljava/lang/Math;->round(F)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     add-int/2addr v4, v5
 | |
| 
 | |
|     .line 13
 | |
|     iget-object v5, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v5}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     sub-int v5, v4, v5
 | |
| 
 | |
|     .line 14
 | |
|     iget-object v6, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v6, v0, v5, v2, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
 | |
| 
 | |
|     .line 15
 | |
|     iget-object v4, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     invoke-virtual {v4, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
 | |
| 
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 16
 | |
|     :cond_1
 | |
|     invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public getItemOffsets(Landroid/graphics/Rect;Landroid/view/View;Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$x;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p2, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     const/4 p3, 0x0
 | |
| 
 | |
|     if-nez p2, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1, p3, p3, p3, p3}, Landroid/graphics/Rect;->set(IIII)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     iget p4, p0, Landroidx/recyclerview/widget/l;->b:I
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     if-ne p4, v0, :cond_1
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p2}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     invoke-virtual {p1, p3, p3, p3, p2}, Landroid/graphics/Rect;->set(IIII)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_1
 | |
|     invoke-virtual {p2}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     invoke-virtual {p1, p3, p3, p2, p3}, Landroid/graphics/Rect;->set(IIII)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public h()Landroid/graphics/drawable/Drawable;
 | |
|     .locals 1
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public i(Landroid/graphics/drawable/Drawable;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/graphics/drawable/Drawable;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     new-instance p1, Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     const-string v0, "Drawable cannot be null."
 | |
| 
 | |
|     invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public j(I)V
 | |
|     .locals 1
 | |
| 
 | |
|     if-eqz p1, :cond_1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     if-ne p1, v0, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 1
 | |
|     :cond_0
 | |
|     new-instance p1, Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     const-string v0, "Invalid orientation. It should be either HORIZONTAL or VERTICAL"
 | |
| 
 | |
|     invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p1
 | |
| 
 | |
|     .line 2
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     iput p1, p0, Landroidx/recyclerview/widget/l;->b:I
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onDraw(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$x;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$m;
 | |
| 
 | |
|     move-result-object p3
 | |
| 
 | |
|     if-eqz p3, :cond_2
 | |
| 
 | |
|     iget-object p3, p0, Landroidx/recyclerview/widget/l;->a:Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     if-nez p3, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     iget p3, p0, Landroidx/recyclerview/widget/l;->b:I
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     if-ne p3, v0, :cond_1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/l;->g(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_1
 | |
|     invoke-virtual {p0, p1, p2}, Landroidx/recyclerview/widget/l;->f(Landroid/graphics/Canvas;Landroidx/recyclerview/widget/RecyclerView;)V
 | |
| 
 | |
|     :cond_2
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 |