Skip to content

Commit 7087f8e

Browse files
ymarianafohrman
authored andcommitted
Update MaterialCardView javadocs
PiperOrigin-RevId: 235026790
1 parent 8ffff9c commit 7087f8e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/java/com/google/android/material/card/MaterialCardView.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
* the {@code strokeColor} attribute. Without a {@code strokeColor}, the card will not render a
5454
* stroked border, regardless of the {@code strokeWidth} value.
5555
*
56+
* <p>Cards implement {@link Checkable}, a default way to switch to {@code android:checked_state}
57+
* is not provided. Clients have to call {@link #setChecked(boolean)}. This shows the
58+
* {@link R.attr#checkedIcon app:checkedIcon} and changes the overlay color.
59+
*
60+
* <p>Cards also have a custom state meant to be used when a card is draggable
61+
* {@code app:dragged_state}. It's used by calling {@link #setDragged(boolean)}.
62+
* This changes the overlay color and elevates the card to convey motion.
63+
*
5664
* <p><strong>Note:</strong> Avoid setting {@link View#setClipToOutline} to true. There is an
5765
* intermediate view to clip the content, setting this will have negative performance consequences.
5866
*

0 commit comments

Comments
 (0)