.class public final Lcom/rubensousa/dpadrecyclerview/FadingEdge; .super Ljava/lang/Object; .source "FadingEdge.kt" # annotations .annotation runtime Lkotlin/Metadata; d1 = { "\u0000J\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u000b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u000f\n\u0002\u0018\u0002\n\u0002\u0008\u000e\u0008\u0000\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002J6\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\n2\u0006\u0010\u001c\u001a\u00020\n2\u0006\u0010\u001d\u001a\u00020\u00042\u0006\u0010\u001e\u001a\u00020\u00042\u0006\u0010\u001f\u001a\u00020 2\u0006\u0010!\u001a\u00020\"J\u0018\u0010#\u001a\u00020\t2\u0006\u0010$\u001a\u00020\n2\u0006\u0010%\u001a\u00020\nH\u0002J\u0018\u0010&\u001a\u00020\t2\u0006\u0010\'\u001a\u00020\n2\u0006\u0010(\u001a\u00020\nH\u0002J\u0016\u0010)\u001a\u00020\u001a2\u0006\u0010\u001f\u001a\u00020 2\u0006\u0010!\u001a\u00020\"J\u0016\u0010*\u001a\u00020\u001a2\u0006\u0010\u001f\u001a\u00020 2\u0006\u0010!\u001a\u00020\"J\u0016\u0010+\u001a\u00020\u001a2\u0006\u0010,\u001a\u00020\u00042\u0006\u0010!\u001a\u00020\"J\u0016\u0010-\u001a\u00020\u001a2\u0006\u0010,\u001a\u00020\u00042\u0006\u0010!\u001a\u00020\"J\u000e\u0010.\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u000e\u0010/\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u0018\u00100\u001a\u00020\u00042\u0006\u00101\u001a\u0002022\u0006\u0010!\u001a\u00020\"H\u0002J\u0018\u00103\u001a\u00020\u00042\u0006\u00101\u001a\u0002022\u0006\u0010!\u001a\u00020\"H\u0002J\u000e\u00104\u001a\u00020\u00042\u0006\u0010!\u001a\u00020\"J\u000e\u00105\u001a\u00020\u00042\u0006\u0010!\u001a\u00020\"J.\u00106\u001a\u00020\u001a2\u0006\u0010$\u001a\u00020\n2\u0006\u0010\'\u001a\u00020\n2\u0006\u00107\u001a\u00020\n2\u0006\u00108\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u0016\u00109\u001a\u00020\u001a2\u0006\u0010:\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u0016\u0010;\u001a\u00020\u001a2\u0006\u0010<\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u0016\u0010=\u001a\u00020\u001a2\u0006\u0010:\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u0016\u0010>\u001a\u00020\u001a2\u0006\u0010<\u001a\u00020\n2\u0006\u0010!\u001a\u00020\"J\u0010\u0010?\u001a\u00020\u001a2\u0006\u0010!\u001a\u00020\"H\u0002R\u001e\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0004@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0005\u0010\u0006R\u001e\u0010\u0007\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0004@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0007\u0010\u0006R\u0010\u0010\u0008\u001a\u0004\u0018\u00010\tX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u001e\u0010\u000b\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\n@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000c\u0010\rR\u001e\u0010\u000e\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\n@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000f\u0010\rR\u0010\u0010\u0010\u001a\u0004\u0018\u00010\tX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u001e\u0010\u0011\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\n@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0012\u0010\rR\u001e\u0010\u0013\u001a\u00020\n2\u0006\u0010\u0003\u001a\u00020\n@BX\u0086\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0014\u0010\rR\u000e\u0010\u0015\u001a\u00020\u0016X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0017\u001a\u00020\u0018X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006@" } d2 = { "Lcom/rubensousa/dpadrecyclerview/FadingEdge;", "", "()V", "", "", "isFadingMaxEdge", "()Z", "isFadingMinEdge", "maxShader", "Landroid/graphics/LinearGradient;", "", "maxShaderLength", "getMaxShaderLength", "()I", "maxShaderOffset", "getMaxShaderOffset", "minShader", "minShaderLength", "getMinShaderLength", "minShaderOffset", "getMinShaderOffset", "paint", "Landroid/graphics/Paint;", "rect", "Landroid/graphics/Rect;", "clip", "", "minEdge", "maxEdge", "applyMinFading", "applyMaxFading", "canvas", "Landroid/graphics/Canvas;", "recyclerView", "Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;", "createMaxHorizontalShader", "width", "paddingEnd", "createMaxVerticalShader", "height", "paddingBottom", "drawMax", "drawMin", "enableMaxEdgeFading", "enable", "enableMinEdgeFading", "getMaxEdge", "getMinEdge", "isFirstItemView", "view", "Landroid/view/View;", "isLastItemView", "isMaxFadingEdgeRequired", "isMinFadingEdgeRequired", "onSizeChanged", "oldWidth", "oldHeight", "setMaxEdgeFadingLength", "length", "setMaxEdgeFadingOffset", "offset", "setMinEdgeFadingLength", "setMinEdgeFadingOffset", "updateLayerType", "dpadrecyclerview_release" } k = 0x1 mv = { 0x1, 0x9, 0x0 } xi = 0x30 .end annotation # instance fields .field private isFadingMaxEdge:Z .field private isFadingMinEdge:Z .field private maxShader:Landroid/graphics/LinearGradient; .field private maxShaderLength:I .field private maxShaderOffset:I .field private minShader:Landroid/graphics/LinearGradient; .field private minShaderLength:I .field private minShaderOffset:I .field private final paint:Landroid/graphics/Paint; .field private final rect:Landroid/graphics/Rect; # direct methods .method public constructor ()V .locals 2 .line 30 invoke-direct {p0}, Ljava/lang/Object;->()V .line 52 new-instance v0, Landroid/graphics/Rect; invoke-direct {v0}, Landroid/graphics/Rect;->()V iput-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 53 new-instance v0, Landroid/graphics/Paint; invoke-direct {v0}, Landroid/graphics/Paint;->()V iput-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->paint:Landroid/graphics/Paint; .line 57 new-instance p0, Landroid/graphics/PorterDuffXfermode; sget-object v1, Landroid/graphics/PorterDuff$Mode;->DST_IN:Landroid/graphics/PorterDuff$Mode; invoke-direct {p0, v1}, Landroid/graphics/PorterDuffXfermode;->(Landroid/graphics/PorterDuff$Mode;)V check-cast p0, Landroid/graphics/Xfermode; invoke-virtual {v0, p0}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode; const/4 p0, 0x1 .line 58 invoke-virtual {v0, p0}, Landroid/graphics/Paint;->setDither(Z)V return-void .end method .method private final createMaxHorizontalShader(II)Landroid/graphics/LinearGradient; .locals 8 int-to-float p1, p1 int-to-float p2, p2 sub-float/2addr p1, p2 iget p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I int-to-float p2, p2 sub-float v3, p1, p2 .line 277 new-instance p1, Landroid/graphics/LinearGradient; iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I int-to-float p0, p0 sub-float v1, v3, p0 const/4 v2, 0x0 const/4 v4, 0x0 const/high16 v5, -0x1000000 const/4 v6, 0x0 .line 279 sget-object v7, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode; move-object v0, p1 .line 277 invoke-direct/range {v0 .. v7}, Landroid/graphics/LinearGradient;->(FFFFIILandroid/graphics/Shader$TileMode;)V return-object p1 .end method .method private final createMaxVerticalShader(II)Landroid/graphics/LinearGradient; .locals 8 int-to-float p1, p1 int-to-float p2, p2 sub-float/2addr p1, p2 iget p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I int-to-float p2, p2 sub-float v4, p1, p2 .line 285 new-instance p1, Landroid/graphics/LinearGradient; const/4 v1, 0x0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I int-to-float p0, p0 sub-float v2, v4, p0 const/4 v3, 0x0 const/high16 v5, -0x1000000 const/4 v6, 0x0 .line 287 sget-object v7, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode; move-object v0, p1 .line 285 invoke-direct/range {v0 .. v7}, Landroid/graphics/LinearGradient;->(FFFFIILandroid/graphics/Shader$TileMode;)V return-object p1 .end method .method private final isFirstItemView(Landroid/view/View;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)Z .locals 0 .line 267 invoke-virtual {p2, p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getChildLayoutPosition(Landroid/view/View;)I move-result p0 if-nez p0, :cond_0 const/4 p0, 0x1 goto :goto_0 :cond_0 const/4 p0, 0x0 :goto_0 return p0 .end method .method private final isLastItemView(Landroid/view/View;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)Z .locals 1 .line 271 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter; move-result-object p0 const/4 v0, 0x0 if-eqz p0, :cond_0 invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I move-result p0 goto :goto_0 :cond_0 move p0, v0 .line 272 :goto_0 invoke-virtual {p2, p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getChildLayoutPosition(Landroid/view/View;)I move-result p1 const/4 p2, 0x1 sub-int/2addr p0, p2 if-ne p1, p0, :cond_1 move v0, p2 :cond_1 return v0 .end method .method private final updateLayerType(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 3 iget-boolean v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMinEdge:Z const/4 v1, 0x0 const/4 v2, 0x0 if-nez v0, :cond_1 iget-boolean p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMaxEdge:Z if-eqz p0, :cond_0 goto :goto_0 .line 296 :cond_0 invoke-virtual {p1, v1, v2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->setLayerType(ILandroid/graphics/Paint;)V const/4 p0, 0x1 .line 297 invoke-virtual {p1, p0}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->setWillNotDraw(Z)V goto :goto_1 :cond_1 :goto_0 const/4 p0, 0x2 .line 293 invoke-virtual {p1, p0, v2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->setLayerType(ILandroid/graphics/Paint;)V .line 294 invoke-virtual {p1, v1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->setWillNotDraw(Z)V :goto_1 return-void .end method # virtual methods .method public final clip(IIZZLandroid/graphics/Canvas;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string p0, "canvas" invoke-static {p5, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string p0, "recyclerView" invoke-static {p6, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 223 invoke-virtual {p6}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result p0 const/4 v0, 0x0 if-nez p0, :cond_2 if-eqz p3, :cond_0 goto :goto_0 :cond_0 move p1, v0 :goto_0 if-eqz p4, :cond_1 goto :goto_1 .line 225 :cond_1 invoke-virtual {p6}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result p2 .line 226 :goto_1 invoke-virtual {p6}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result p0 invoke-virtual {p5, p1, v0, p2, p0}, Landroid/graphics/Canvas;->clipRect(IIII)Z goto :goto_4 :cond_2 if-eqz p3, :cond_3 goto :goto_2 :cond_3 move p1, v0 :goto_2 if-eqz p4, :cond_4 goto :goto_3 .line 229 :cond_4 invoke-virtual {p6}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result p2 .line 230 :goto_3 invoke-virtual {p6}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result p0 invoke-virtual {p5, v0, p1, p0, p2}, Landroid/graphics/Canvas;->clipRect(IIII)Z :goto_4 return-void .end method .method public final drawMax(Landroid/graphics/Canvas;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 2 const-string v0, "canvas" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->paint:Landroid/graphics/Paint; iget-object v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShader:Landroid/graphics/LinearGradient; .line 251 check-cast v1, Landroid/graphics/Shader; invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader; .line 252 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v0 const/4 v1, 0x0 if-nez v0, :cond_0 iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 253 iput v1, v0, Landroid/graphics/Rect;->top:I iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 254 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result v1 iput v1, v0, Landroid/graphics/Rect;->bottom:I iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 255 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result v1 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingRight()I move-result p2 sub-int/2addr v1, p2 iget p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I sub-int/2addr v1, p2 iput v1, v0, Landroid/graphics/Rect;->right:I iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 256 iget v0, p2, Landroid/graphics/Rect;->right:I iget v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I sub-int/2addr v0, v1 iput v0, p2, Landroid/graphics/Rect;->left:I goto :goto_0 :cond_0 iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 258 iput v1, v0, Landroid/graphics/Rect;->left:I iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 259 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result v1 iput v1, v0, Landroid/graphics/Rect;->right:I iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 260 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result v1 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingBottom()I move-result p2 sub-int/2addr v1, p2 iget p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I sub-int/2addr v1, p2 iput v1, v0, Landroid/graphics/Rect;->bottom:I iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 261 iget v0, p2, Landroid/graphics/Rect;->bottom:I iget v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I sub-int/2addr v0, v1 iput v0, p2, Landroid/graphics/Rect;->top:I :goto_0 iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; iget-object p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->paint:Landroid/graphics/Paint; .line 263 invoke-virtual {p1, p2, p0}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V return-void .end method .method public final drawMin(Landroid/graphics/Canvas;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 2 const-string v0, "canvas" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->paint:Landroid/graphics/Paint; iget-object v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShader:Landroid/graphics/LinearGradient; .line 235 check-cast v1, Landroid/graphics/Shader; invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader; .line 236 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v0 const/4 v1, 0x0 if-nez v0, :cond_0 iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 237 iput v1, v0, Landroid/graphics/Rect;->top:I iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 238 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result p2 iput p2, v0, Landroid/graphics/Rect;->bottom:I iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I .line 239 iput v0, p2, Landroid/graphics/Rect;->left:I iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I iget v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I add-int/2addr v0, v1 .line 240 iput v0, p2, Landroid/graphics/Rect;->right:I goto :goto_0 :cond_0 iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 242 iput v1, v0, Landroid/graphics/Rect;->left:I iget-object v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; .line 243 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result p2 iput p2, v0, Landroid/graphics/Rect;->right:I iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I .line 244 iput v0, p2, Landroid/graphics/Rect;->top:I iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I iget v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I add-int/2addr v0, v1 .line 245 iput v0, p2, Landroid/graphics/Rect;->bottom:I :goto_0 iget-object p2, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->rect:Landroid/graphics/Rect; iget-object p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->paint:Landroid/graphics/Paint; .line 247 invoke-virtual {p1, p2, p0}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V return-void .end method .method public final enableMaxEdgeFading(ZLcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMaxEdge:Z if-ne v0, p1, :cond_0 return-void :cond_0 iput-boolean p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMaxEdge:Z .line 123 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V .line 124 invoke-direct {p0, p2}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->updateLayerType(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V return-void .end method .method public final enableMinEdgeFading(ZLcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMinEdge:Z if-ne v0, p1, :cond_0 return-void :cond_0 iput-boolean p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMinEdge:Z .line 88 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V .line 89 invoke-direct {p0, p2}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->updateLayerType(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V return-void .end method .method public final getMaxEdge(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)I .locals 2 const-string v0, "recyclerView" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 204 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v0 if-nez v0, :cond_0 .line 205 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingRight()I move-result v0 .line 206 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result p1 goto :goto_0 .line 208 :cond_0 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingBottom()I move-result v0 .line 209 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result p1 :goto_0 iget-boolean v1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMaxEdge:Z if-nez v1, :cond_1 return p1 :cond_1 sub-int/2addr p1, v0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I sub-int/2addr p1, p0 return p1 .end method .method public final getMaxShaderLength()I .locals 0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I return p0 .end method .method public final getMaxShaderOffset()I .locals 0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I return p0 .end method .method public final getMinEdge(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)I .locals 1 const-string v0, "recyclerView" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMinEdge:Z if-nez v0, :cond_0 const/4 p0, 0x0 return p0 .line 193 :cond_0 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v0 if-nez v0, :cond_1 .line 194 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingLeft()I move-result p1 goto :goto_0 .line 196 :cond_1 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingTop()I move-result p1 :goto_0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I add-int/2addr p1, p0 return p1 .end method .method public final getMinShaderLength()I .locals 0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I return p0 .end method .method public final getMinShaderOffset()I .locals 0 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I return p0 .end method .method public final isFadingMaxEdge()Z .locals 0 iget-boolean p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMaxEdge:Z return p0 .end method .method public final isFadingMinEdge()Z .locals 0 iget-boolean p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMinEdge:Z return p0 .end method .method public final isMaxFadingEdgeRequired(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)Z .locals 5 const-string v0, "recyclerView" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMaxEdge:Z const/4 v1, 0x0 if-nez v0, :cond_0 return v1 .line 174 :cond_0 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getChildCount()I move-result v0 if-nez v0, :cond_1 return v1 .line 176 :cond_1 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v2 const/4 v3, 0x1 if-nez v2, :cond_2 move v2, v3 goto :goto_0 :cond_2 move v2, v1 :goto_0 sub-int/2addr v0, v3 .line 177 invoke-virtual {p1, v0}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getChildAt(I)Landroid/view/View; move-result-object v0 .line 178 invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-direct {p0, v0, p1}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isLastItemView(Landroid/view/View;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)Z move-result v4 if-eqz v2, :cond_3 .line 182 invoke-virtual {v0}, Landroid/view/View;->getRight()I move-result v0 .line 183 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result v2 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingRight()I move-result p1 goto :goto_1 .line 185 :cond_3 invoke-virtual {v0}, Landroid/view/View;->getBottom()I move-result v0 .line 186 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result v2 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingBottom()I move-result p1 :goto_1 sub-int/2addr v2, p1 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I sub-int p0, v2, p0 if-le v0, p0, :cond_4 if-eqz v4, :cond_5 :cond_4 if-le v0, v2, :cond_6 if-eqz v4, :cond_6 :cond_5 move v1, v3 :cond_6 return v1 .end method .method public final isMinFadingEdgeRequired(Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)Z .locals 5 const-string v0, "recyclerView" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFadingMinEdge:Z const/4 v1, 0x0 if-nez v0, :cond_0 return v1 .line 153 :cond_0 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getChildCount()I move-result v0 if-nez v0, :cond_1 return v1 .line 155 :cond_1 invoke-virtual {p1, v1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getChildAt(I)Landroid/view/View; move-result-object v0 .line 156 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v2 const/4 v3, 0x1 if-nez v2, :cond_2 move v2, v3 goto :goto_0 :cond_2 move v2, v1 .line 157 :goto_0 invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-direct {p0, v0, p1}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->isFirstItemView(Landroid/view/View;Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)Z move-result v4 if-eqz v2, :cond_3 .line 161 invoke-virtual {v0}, Landroid/view/View;->getLeft()I move-result v0 .line 162 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingLeft()I move-result p1 goto :goto_1 .line 164 :cond_3 invoke-virtual {v0}, Landroid/view/View;->getTop()I move-result v0 .line 165 invoke-virtual {p1}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingTop()I move-result p1 :goto_1 iget p0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I add-int/2addr p0, p1 if-ge v0, p0, :cond_4 if-eqz v4, :cond_5 :cond_4 if-ge v0, p1, :cond_6 if-eqz v4, :cond_6 :cond_5 move v1, v3 :cond_6 return v1 .end method .method public final onSizeChanged(IIIILcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string v0, "recyclerView" invoke-static {p5, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I if-nez v0, :cond_0 return-void .line 71 :cond_0 invoke-virtual {p5}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v0 if-nez v0, :cond_1 if-eq p1, p3, :cond_2 .line 73 invoke-virtual {p5}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingRight()I move-result p2 invoke-direct {p0, p1, p2}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->createMaxHorizontalShader(II)Landroid/graphics/LinearGradient; move-result-object p1 iput-object p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShader:Landroid/graphics/LinearGradient; goto :goto_0 :cond_1 if-eq p2, p4, :cond_2 .line 77 invoke-virtual {p5}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingBottom()I move-result p1 invoke-direct {p0, p2, p1}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->createMaxVerticalShader(II)Landroid/graphics/LinearGradient; move-result-object p1 iput-object p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShader:Landroid/graphics/LinearGradient; .line 81 :goto_0 invoke-virtual {p5}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V :cond_2 return-void .end method .method public final setMaxEdgeFadingLength(ILcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I if-ne v0, p1, :cond_0 return-void :cond_0 iput p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderLength:I if-eqz p1, :cond_2 .line 131 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result p1 if-nez p1, :cond_1 .line 132 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getWidth()I move-result p1 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingRight()I move-result v0 invoke-direct {p0, p1, v0}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->createMaxHorizontalShader(II)Landroid/graphics/LinearGradient; move-result-object p1 goto :goto_0 .line 134 :cond_1 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getHeight()I move-result p1 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getPaddingBottom()I move-result v0 invoke-direct {p0, p1, v0}, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->createMaxVerticalShader(II)Landroid/graphics/LinearGradient; move-result-object p1 goto :goto_0 :cond_2 const/4 p1, 0x0 :goto_0 iput-object p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShader:Landroid/graphics/LinearGradient; .line 139 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V return-void .end method .method public final setMaxEdgeFadingOffset(ILcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I if-eq v0, p1, :cond_0 iput p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->maxShaderOffset:I .line 145 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V :cond_0 return-void .end method .method public final setMinEdgeFadingLength(ILcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 20 move-object/from16 v0, p0 move/from16 v1, p1 const-string v2, "recyclerView" move-object/from16 v3, p2 invoke-static {v3, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget v2, v0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I if-ne v2, v1, :cond_0 return-void :cond_0 iput v1, v0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I if-eqz v1, :cond_2 .line 96 invoke-virtual/range {p2 .. p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->getOrientation()I move-result v1 if-nez v1, :cond_1 .line 97 new-instance v1, Landroid/graphics/LinearGradient; const/4 v5, 0x0 const/4 v6, 0x0 iget v2, v0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I int-to-float v7, v2 const/4 v8, 0x0 const/4 v9, 0x0 const/high16 v10, -0x1000000 .line 99 sget-object v11, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode; move-object v4, v1 .line 97 invoke-direct/range {v4 .. v11}, Landroid/graphics/LinearGradient;->(FFFFIILandroid/graphics/Shader$TileMode;)V goto :goto_0 .line 102 :cond_1 new-instance v1, Landroid/graphics/LinearGradient; const/4 v13, 0x0 const/4 v14, 0x0 const/4 v15, 0x0 iget v2, v0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderLength:I int-to-float v2, v2 const/16 v17, 0x0 const/high16 v18, -0x1000000 .line 104 sget-object v19, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode; move-object v12, v1 move/from16 v16, v2 .line 102 invoke-direct/range {v12 .. v19}, Landroid/graphics/LinearGradient;->(FFFFIILandroid/graphics/Shader$TileMode;)V goto :goto_0 :cond_2 const/4 v1, 0x0 :goto_0 iput-object v1, v0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShader:Landroid/graphics/LinearGradient; .line 110 invoke-virtual/range {p2 .. p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V return-void .end method .method public final setMinEdgeFadingOffset(ILcom/rubensousa/dpadrecyclerview/DpadRecyclerView;)V .locals 1 const-string v0, "recyclerView" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget v0, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I if-eq v0, p1, :cond_0 iput p1, p0, Lcom/rubensousa/dpadrecyclerview/FadingEdge;->minShaderOffset:I .line 116 invoke-virtual {p2}, Lcom/rubensousa/dpadrecyclerview/DpadRecyclerView;->invalidate()V :cond_0 return-void .end method