.class public Landroidx/cardview/widget/CardView; .super Landroid/widget/FrameLayout; .source "CardView.java" # static fields .field private static final COLOR_BACKGROUND_ATTR:[I .field private static final IMPL:Landroidx/cardview/widget/CardViewImpl; # instance fields .field private final mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; .field private mCompatPadding:Z .field public final mContentPadding:Landroid/graphics/Rect; .field private mPreventCornerOverlap:Z .field public final mShadowBounds:Landroid/graphics/Rect; .field public mUserSetMinHeight:I .field public mUserSetMinWidth:I # direct methods .method public static constructor ()V .locals 3 const/4 v0, 0x1 new-array v0, v0, [I const/4 v1, 0x0 const v2, 0x1010031 aput v2, v0, v1 sput-object v0, Landroidx/cardview/widget/CardView;->COLOR_BACKGROUND_ATTR:[I new-instance v0, Landroidx/cardview/widget/CardViewApi21Impl; invoke-direct {v0}, Landroidx/cardview/widget/CardViewApi21Impl;->()V sput-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; invoke-interface {v0}, Landroidx/cardview/widget/CardViewImpl;->initStatic()V return-void .end method .method public constructor (Landroid/content/Context;)V .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param const/4 v0, 0x0 invoke-direct {p0, p1, v0}, Landroidx/cardview/widget/CardView;->(Landroid/content/Context;Landroid/util/AttributeSet;)V return-void .end method .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroid/util/AttributeSet; .annotation build Landroidx/annotation/Nullable; .end annotation .end param sget v0, Landroidx/cardview/R$attr;->cardViewStyle:I invoke-direct {p0, p1, p2, v0}, Landroidx/cardview/widget/CardView;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V return-void .end method .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;I)V .locals 9 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroid/util/AttributeSet; .annotation build Landroidx/annotation/Nullable; .end annotation .end param invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;->(Landroid/content/Context;Landroid/util/AttributeSet;I)V new-instance v0, Landroid/graphics/Rect; invoke-direct {v0}, Landroid/graphics/Rect;->()V iput-object v0, p0, Landroidx/cardview/widget/CardView;->mContentPadding:Landroid/graphics/Rect; new-instance v1, Landroid/graphics/Rect; invoke-direct {v1}, Landroid/graphics/Rect;->()V iput-object v1, p0, Landroidx/cardview/widget/CardView;->mShadowBounds:Landroid/graphics/Rect; new-instance v3, Landroidx/cardview/widget/CardView$1; invoke-direct {v3, p0}, Landroidx/cardview/widget/CardView$1;->(Landroidx/cardview/widget/CardView;)V iput-object v3, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; sget-object v1, Landroidx/cardview/R$styleable;->CardView:[I sget v2, Landroidx/cardview/R$style;->CardView:I invoke-virtual {p1, p2, v1, p3, v2}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray; move-result-object p2 sget p3, Landroidx/cardview/R$styleable;->CardView_cardBackgroundColor:I invoke-virtual {p2, p3}, Landroid/content/res/TypedArray;->hasValue(I)Z move-result v1 const/4 v2, 0x0 if-eqz v1, :cond_0 invoke-virtual {p2, p3}, Landroid/content/res/TypedArray;->getColorStateList(I)Landroid/content/res/ColorStateList; move-result-object p3 :goto_0 move-object v5, p3 goto :goto_2 :cond_0 invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context; move-result-object p3 sget-object v1, Landroidx/cardview/widget/CardView;->COLOR_BACKGROUND_ATTR:[I invoke-virtual {p3, v1}, Landroid/content/Context;->obtainStyledAttributes([I)Landroid/content/res/TypedArray; move-result-object p3 invoke-virtual {p3, v2, v2}, Landroid/content/res/TypedArray;->getColor(II)I move-result v1 invoke-virtual {p3}, Landroid/content/res/TypedArray;->recycle()V const/4 p3, 0x3 new-array p3, p3, [F invoke-static {v1, p3}, Landroid/graphics/Color;->colorToHSV(I[F)V const/4 v1, 0x2 aget p3, p3, v1 const/high16 v1, 0x3f000000 # 0.5f cmpl-float p3, p3, v1 if-lez p3, :cond_1 invoke-virtual {p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources; move-result-object p3 sget v1, Landroidx/cardview/R$color;->cardview_light_background:I invoke-virtual {p3, v1}, Landroid/content/res/Resources;->getColor(I)I move-result p3 goto :goto_1 :cond_1 invoke-virtual {p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources; move-result-object p3 sget v1, Landroidx/cardview/R$color;->cardview_dark_background:I invoke-virtual {p3, v1}, Landroid/content/res/Resources;->getColor(I)I move-result p3 :goto_1 invoke-static {p3}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList; move-result-object p3 goto :goto_0 :goto_2 sget p3, Landroidx/cardview/R$styleable;->CardView_cardCornerRadius:I const/4 v1, 0x0 invoke-virtual {p2, p3, v1}, Landroid/content/res/TypedArray;->getDimension(IF)F move-result v6 sget p3, Landroidx/cardview/R$styleable;->CardView_cardElevation:I invoke-virtual {p2, p3, v1}, Landroid/content/res/TypedArray;->getDimension(IF)F move-result v7 sget p3, Landroidx/cardview/R$styleable;->CardView_cardMaxElevation:I invoke-virtual {p2, p3, v1}, Landroid/content/res/TypedArray;->getDimension(IF)F move-result p3 sget v1, Landroidx/cardview/R$styleable;->CardView_cardUseCompatPadding:I invoke-virtual {p2, v1, v2}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z move-result v1 iput-boolean v1, p0, Landroidx/cardview/widget/CardView;->mCompatPadding:Z sget v1, Landroidx/cardview/R$styleable;->CardView_cardPreventCornerOverlap:I const/4 v4, 0x1 invoke-virtual {p2, v1, v4}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z move-result v1 iput-boolean v1, p0, Landroidx/cardview/widget/CardView;->mPreventCornerOverlap:Z sget v1, Landroidx/cardview/R$styleable;->CardView_contentPadding:I invoke-virtual {p2, v1, v2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result v1 sget v4, Landroidx/cardview/R$styleable;->CardView_contentPaddingLeft:I invoke-virtual {p2, v4, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result v4 iput v4, v0, Landroid/graphics/Rect;->left:I sget v4, Landroidx/cardview/R$styleable;->CardView_contentPaddingTop:I invoke-virtual {p2, v4, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result v4 iput v4, v0, Landroid/graphics/Rect;->top:I sget v4, Landroidx/cardview/R$styleable;->CardView_contentPaddingRight:I invoke-virtual {p2, v4, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result v4 iput v4, v0, Landroid/graphics/Rect;->right:I sget v4, Landroidx/cardview/R$styleable;->CardView_contentPaddingBottom:I invoke-virtual {p2, v4, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result v1 iput v1, v0, Landroid/graphics/Rect;->bottom:I cmpl-float v0, v7, p3 if-lez v0, :cond_2 move v8, v7 goto :goto_3 :cond_2 move v8, p3 :goto_3 sget p3, Landroidx/cardview/R$styleable;->CardView_android_minWidth:I invoke-virtual {p2, p3, v2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result p3 iput p3, p0, Landroidx/cardview/widget/CardView;->mUserSetMinWidth:I sget p3, Landroidx/cardview/R$styleable;->CardView_android_minHeight:I invoke-virtual {p2, p3, v2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I move-result p3 iput p3, p0, Landroidx/cardview/widget/CardView;->mUserSetMinHeight:I invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V sget-object v2, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; move-object v4, p1 invoke-interface/range {v2 .. v8}, Landroidx/cardview/widget/CardViewImpl;->initialize(Landroidx/cardview/widget/CardViewDelegate;Landroid/content/Context;Landroid/content/res/ColorStateList;FFF)V return-void .end method .method public static synthetic access$001(Landroidx/cardview/widget/CardView;IIII)V .locals 0 invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/FrameLayout;->setPadding(IIII)V return-void .end method .method public static synthetic access$101(Landroidx/cardview/widget/CardView;I)V .locals 0 invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setMinimumWidth(I)V return-void .end method .method public static synthetic access$201(Landroidx/cardview/widget/CardView;I)V .locals 0 invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setMinimumHeight(I)V return-void .end method # virtual methods .method public getCardBackgroundColor()Landroid/content/res/ColorStateList; .locals 2 .annotation build Landroidx/annotation/NonNull; .end annotation sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1}, Landroidx/cardview/widget/CardViewImpl;->getBackgroundColor(Landroidx/cardview/widget/CardViewDelegate;)Landroid/content/res/ColorStateList; move-result-object v0 return-object v0 .end method .method public getCardElevation()F .locals 2 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1}, Landroidx/cardview/widget/CardViewImpl;->getElevation(Landroidx/cardview/widget/CardViewDelegate;)F move-result v0 return v0 .end method .method public getContentPaddingBottom()I .locals 1 .annotation build Landroidx/annotation/Px; .end annotation iget-object v0, p0, Landroidx/cardview/widget/CardView;->mContentPadding:Landroid/graphics/Rect; iget v0, v0, Landroid/graphics/Rect;->bottom:I return v0 .end method .method public getContentPaddingLeft()I .locals 1 .annotation build Landroidx/annotation/Px; .end annotation iget-object v0, p0, Landroidx/cardview/widget/CardView;->mContentPadding:Landroid/graphics/Rect; iget v0, v0, Landroid/graphics/Rect;->left:I return v0 .end method .method public getContentPaddingRight()I .locals 1 .annotation build Landroidx/annotation/Px; .end annotation iget-object v0, p0, Landroidx/cardview/widget/CardView;->mContentPadding:Landroid/graphics/Rect; iget v0, v0, Landroid/graphics/Rect;->right:I return v0 .end method .method public getContentPaddingTop()I .locals 1 .annotation build Landroidx/annotation/Px; .end annotation iget-object v0, p0, Landroidx/cardview/widget/CardView;->mContentPadding:Landroid/graphics/Rect; iget v0, v0, Landroid/graphics/Rect;->top:I return v0 .end method .method public getMaxCardElevation()F .locals 2 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1}, Landroidx/cardview/widget/CardViewImpl;->getMaxElevation(Landroidx/cardview/widget/CardViewDelegate;)F move-result v0 return v0 .end method .method public getPreventCornerOverlap()Z .locals 1 iget-boolean v0, p0, Landroidx/cardview/widget/CardView;->mPreventCornerOverlap:Z return v0 .end method .method public getRadius()F .locals 2 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1}, Landroidx/cardview/widget/CardViewImpl;->getRadius(Landroidx/cardview/widget/CardViewDelegate;)F move-result v0 return v0 .end method .method public getUseCompatPadding()Z .locals 1 iget-boolean v0, p0, Landroidx/cardview/widget/CardView;->mCompatPadding:Z return v0 .end method .method public onMeasure(II)V .locals 6 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; instance-of v1, v0, Landroidx/cardview/widget/CardViewApi21Impl; if-nez v1, :cond_2 invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I move-result v1 const/high16 v2, 0x40000000 # 2.0f const/high16 v3, -0x80000000 if-eq v1, v3, :cond_0 if-eq v1, v2, :cond_0 goto :goto_0 :cond_0 iget-object v4, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v4}, Landroidx/cardview/widget/CardViewImpl;->getMinWidth(Landroidx/cardview/widget/CardViewDelegate;)F move-result v4 float-to-double v4, v4 invoke-static {v4, v5}, Ljava/lang/Math;->ceil(D)D move-result-wide v4 double-to-int v4, v4 invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I move-result p1 invoke-static {v4, p1}, Ljava/lang/Math;->max(II)I move-result p1 invoke-static {p1, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I move-result p1 :goto_0 invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I move-result v1 if-eq v1, v3, :cond_1 if-eq v1, v2, :cond_1 goto :goto_1 :cond_1 iget-object v2, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v2}, Landroidx/cardview/widget/CardViewImpl;->getMinHeight(Landroidx/cardview/widget/CardViewDelegate;)F move-result v0 float-to-double v2, v0 invoke-static {v2, v3}, Ljava/lang/Math;->ceil(D)D move-result-wide v2 double-to-int v0, v2 invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I move-result p2 invoke-static {v0, p2}, Ljava/lang/Math;->max(II)I move-result p2 invoke-static {p2, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I move-result p2 :goto_1 invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onMeasure(II)V goto :goto_2 :cond_2 invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onMeasure(II)V :goto_2 return-void .end method .method public setCardBackgroundColor(I)V .locals 2 .param p1 # I .annotation build Landroidx/annotation/ColorInt; .end annotation .end param sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-static {p1}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList; move-result-object p1 invoke-interface {v0, v1, p1}, Landroidx/cardview/widget/CardViewImpl;->setBackgroundColor(Landroidx/cardview/widget/CardViewDelegate;Landroid/content/res/ColorStateList;)V return-void .end method .method public setCardBackgroundColor(Landroid/content/res/ColorStateList;)V .locals 2 .param p1 # Landroid/content/res/ColorStateList; .annotation build Landroidx/annotation/Nullable; .end annotation .end param sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1, p1}, Landroidx/cardview/widget/CardViewImpl;->setBackgroundColor(Landroidx/cardview/widget/CardViewDelegate;Landroid/content/res/ColorStateList;)V return-void .end method .method public setCardElevation(F)V .locals 2 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1, p1}, Landroidx/cardview/widget/CardViewImpl;->setElevation(Landroidx/cardview/widget/CardViewDelegate;F)V return-void .end method .method public setContentPadding(IIII)V .locals 1 .param p1 # I .annotation build Landroidx/annotation/Px; .end annotation .end param .param p2 # I .annotation build Landroidx/annotation/Px; .end annotation .end param .param p3 # I .annotation build Landroidx/annotation/Px; .end annotation .end param .param p4 # I .annotation build Landroidx/annotation/Px; .end annotation .end param iget-object v0, p0, Landroidx/cardview/widget/CardView;->mContentPadding:Landroid/graphics/Rect; invoke-virtual {v0, p1, p2, p3, p4}, Landroid/graphics/Rect;->set(IIII)V sget-object p1, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object p2, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {p1, p2}, Landroidx/cardview/widget/CardViewImpl;->updatePadding(Landroidx/cardview/widget/CardViewDelegate;)V return-void .end method .method public setMaxCardElevation(F)V .locals 2 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1, p1}, Landroidx/cardview/widget/CardViewImpl;->setMaxElevation(Landroidx/cardview/widget/CardViewDelegate;F)V return-void .end method .method public setMinimumHeight(I)V .locals 0 iput p1, p0, Landroidx/cardview/widget/CardView;->mUserSetMinHeight:I invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setMinimumHeight(I)V return-void .end method .method public setMinimumWidth(I)V .locals 0 iput p1, p0, Landroidx/cardview/widget/CardView;->mUserSetMinWidth:I invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setMinimumWidth(I)V return-void .end method .method public setPadding(IIII)V .locals 0 return-void .end method .method public setPaddingRelative(IIII)V .locals 0 return-void .end method .method public setPreventCornerOverlap(Z)V .locals 1 iget-boolean v0, p0, Landroidx/cardview/widget/CardView;->mPreventCornerOverlap:Z if-eq p1, v0, :cond_0 iput-boolean p1, p0, Landroidx/cardview/widget/CardView;->mPreventCornerOverlap:Z sget-object p1, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v0, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {p1, v0}, Landroidx/cardview/widget/CardViewImpl;->onPreventCornerOverlapChanged(Landroidx/cardview/widget/CardViewDelegate;)V :cond_0 return-void .end method .method public setRadius(F)V .locals 2 sget-object v0, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v1, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {v0, v1, p1}, Landroidx/cardview/widget/CardViewImpl;->setRadius(Landroidx/cardview/widget/CardViewDelegate;F)V return-void .end method .method public setUseCompatPadding(Z)V .locals 1 iget-boolean v0, p0, Landroidx/cardview/widget/CardView;->mCompatPadding:Z if-eq v0, p1, :cond_0 iput-boolean p1, p0, Landroidx/cardview/widget/CardView;->mCompatPadding:Z sget-object p1, Landroidx/cardview/widget/CardView;->IMPL:Landroidx/cardview/widget/CardViewImpl; iget-object v0, p0, Landroidx/cardview/widget/CardView;->mCardViewDelegate:Landroidx/cardview/widget/CardViewDelegate; invoke-interface {p1, v0}, Landroidx/cardview/widget/CardViewImpl;->onCompatPaddingChanged(Landroidx/cardview/widget/CardViewDelegate;)V :cond_0 return-void .end method