Skip to content

Commit ab719c4

Browse files
committed
fix:removed
1 parent 1f378ad commit ab719c4

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

design/src/main/java/com/github/kr328/clash/design/view/LargeActionCard.kt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import com.google.android.material.card.MaterialCardView
1212
class LargeActionCard @JvmOverloads constructor(
1313
context: Context,
1414
attributeSet: AttributeSet? = null,
15-
@AttrRes defStyleAttr: Int = com.google.android.material.R.attr.materialCardViewStyle
15+
@AttrRes defStyleAttr: Int = 0
1616
) : MaterialCardView(context, attributeSet, defStyleAttr) {
17-
1817
private val binding = ComponentLargeActionLabelBinding
1918
.inflate(context.layoutInflater, this, true)
2019

@@ -37,11 +36,6 @@ class LargeActionCard @JvmOverloads constructor(
3736
}
3837

3938
init {
40-
radius = context.resources.getDimension(R.dimen.large_action_card_radius)
41-
cardElevation = context.resources.getDimension(R.dimen.large_action_card_elevation)
42-
43-
strokeWidth = 0
44-
4539
context.resolveClickableAttrs(attributeSet, defStyleAttr) {
4640
isFocusable = focusable(true)
4741
isClickable = clickable(true)
@@ -63,8 +57,9 @@ class LargeActionCard @JvmOverloads constructor(
6357
}
6458
}
6559

66-
if (cardBackgroundColor == null) {
67-
setCardBackgroundColor(context.resolveThemedColor(com.google.android.material.R.attr.colorSurfaceVariant))
68-
}
60+
minimumHeight = context.getPixels(R.dimen.large_action_card_min_height)
61+
radius = context.getPixels(R.dimen.large_action_card_radius).toFloat()
62+
elevation = context.getPixels(R.dimen.large_action_card_elevation).toFloat()
63+
setCardBackgroundColor(context.resolveThemedColor(com.google.android.material.R.attr.colorSurface))
6964
}
70-
}
65+
}

0 commit comments

Comments
 (0)