# TransformationChildCard

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/transformation/TransformationChildCard.java)

*** ** * ** ***


```
public class TransformationChildCard extends CircularRevealCardView
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||||
| ↳ | [com.google.android.material.card.MaterialCardView](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView) |||
|   | ↳ | [com.google.android.material.circularreveal.cardview.CircularRevealCardView](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView) ||
|   |   | ↳ | [com.google.android.material.transformation.TransformationChildCard](https://developer.android.com/reference/com/google/android/material/transformation/TransformationChildCard) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use `https://developer.android.com/reference/com/google/android/material/transition/MaterialContainerTransform` instead.

CardView layout for views that can react to an `https://developer.android.com/reference/com/google/android/material/expandable/ExpandableWidget`'s `https://developer.android.com/reference/com/google/android/material/expandable/ExpandableWidget#setExpanded(boolean)` state changes by transforming the ExpandableWidget into itself.

This ViewGroup should contain exactly one child.

This class should be used if you need to support shadows on pre-L devices.

## Summary

| ### Public constructors |
|---|
| `[TransformationChildCard](https://developer.android.com/reference/com/google/android/material/transformation/TransformationChildCard#TransformationChildCard(Context))(Context context)` |
| `[TransformationChildCard](https://developer.android.com/reference/com/google/android/material/transformation/TransformationChildCard#TransformationChildCard(Context,AttributeSet))(Context context, AttributeSet attrs)` |

| ### Inherited Constants |
|---|
| From [com.google.android.material.card.MaterialCardView](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView) |---|---| | `static final int` | `https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#CHECKED_ICON_GRAVITY_BOTTOM_END()` Gravity used to position the checked icon at the bottom\|end of the Card. | | `static final int` | `https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#CHECKED_ICON_GRAVITY_BOTTOM_START()` Gravity used to position the checked icon at the bottom\|start of the Card. | | `static final int` | `https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#CHECKED_ICON_GRAVITY_TOP_END()` Gravity used to position the checked icon at the top\|end of the Card. | | `static final int` | `https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#CHECKED_ICON_GRAVITY_TOP_START()` Gravity used to position the checked icon at the top\|start of the Card. | |

| ### Inherited methods |
|---|
| From [com.google.android.material.circularreveal.cardview.CircularRevealCardView](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView) |---|---| | `void` | `[actualDraw](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#actualDraw(Canvas))(Canvas canvas)` Calls super#draw(Canvas). | | `boolean` | `[actualIsOpaque](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#actualIsOpaque())()` Calls super#isOpaque(). | | `void` | `[buildCircularRevealCache](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#buildCircularRevealCache())()` Prepares the reveal info property to be modified. | | `void` | `[destroyCircularRevealCache](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#destroyCircularRevealCache())()` Cleans up after the reveal info property is reset. | | `void` | `[draw](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#draw(Canvas))(Canvas canvas)` Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`. | | `Drawable` | `[getCircularRevealOverlayDrawable](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#getCircularRevealOverlayDrawable())()` Returns the circular reveal overlay drawable if one exists, or null. | | `int` | `[getCircularRevealScrimColor](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#getCircularRevealScrimColor())()` Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`. | | `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealWidget.RevealInfo` | `[getRevealInfo](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#getRevealInfo())()` Returns the current reveal info if one exists, or null. | | `boolean` | `[isOpaque](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#isOpaque())()` Implementations should call the corresponding method in `https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealHelper`. | | `void` | `[setCircularRevealOverlayDrawable](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#setCircularRevealOverlayDrawable(Drawable))(Drawable drawable)` Sets the circular reveal overlay drawable, which is an icon that's drawn above everything else, including the circular reveal scrim color. | | `void` | `[setCircularRevealScrimColor](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#setCircularRevealScrimColor(int))(int color)` Sets the circular reveal scrim color, which is a color that's drawn above this widget's contents. | | `void` | `[setRevealInfo](https://developer.android.com/reference/com/google/android/material/circularreveal/cardview/CircularRevealCardView#setRevealInfo(com.google.android.material.circularreveal.CircularRevealWidget.RevealInfo))(https://developer.android.com/reference/com/google/android/material/circularreveal/CircularRevealWidget.RevealInfo revealInfo)` Sets the current reveal info. | |
| From [com.google.android.material.card.MaterialCardView](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView) |---|---| | `ColorStateList` | `[getCardBackgroundColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCardBackgroundColor())()` | | `ColorStateList` | `[getCardForegroundColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCardForegroundColor())()` Sets the ripple color for this card. | | `Drawable` | `[getCheckedIcon](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCheckedIcon())()` Returns this cards's checked icon. | | `int` | `@https://developer.android.com/reference/com/google/android/material/card/MaterialCardView.CheckedIconGravity [getCheckedIconGravity](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCheckedIconGravity())()` Gets the checked icon gravity for this card | | `int` | `[getCheckedIconMargin](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCheckedIconMargin())()` | | `int` | `[getCheckedIconSize](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCheckedIconSize())()` | | `ColorStateList` | `[getCheckedIconTint](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getCheckedIconTint())()` Returns the android.content.res.ColorStateList used to tint the checked icon. | | `int` | `[getContentPaddingBottom](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getContentPaddingBottom())()` | | `int` | `[getContentPaddingLeft](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getContentPaddingLeft())()` | | `int` | `[getContentPaddingRight](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getContentPaddingRight())()` | | `int` | `[getContentPaddingTop](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getContentPaddingTop())()` | | `float` | `[getProgress](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getProgress())()` Returns the interpolation on the Shape Path of the card. | | `float` | `[getRadius](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getRadius())()` | | `ColorStateList` | `[getRippleColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getRippleColor())()` Gets the ripple color for this card. | | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel` | `[getShapeAppearanceModel](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getShapeAppearanceModel())()` Due to limitations in the current implementation, if you modify the returned object call `https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setShapeAppearanceModel(com.google.android.material.shape.ShapeAppearanceModel)` again with the modified value to propagate the required changes. | | `int` | `[getStrokeColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getStrokeColor())()` **This method is deprecated.** use `https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getStrokeColorStateList()` <br /> | | `ColorStateList` | `[getStrokeColorStateList](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getStrokeColorStateList())()` Returns the stroke ColorStateList of this card view. | | `int` | `[getStrokeWidth](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#getStrokeWidth())()` Returns the stroke width of this card view. | | `boolean` | `[isCheckable](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#isCheckable())()` Returns whether this Card is checkable. | | `boolean` | `[isChecked](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#isChecked())()` | | `boolean` | `[isDragged](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#isDragged())()` | | `void` | `[onAttachedToWindow](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#onAttachedToWindow())()` | | `int[]` | `[onCreateDrawableState](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#onCreateDrawableState(int))(int extraSpace)` | | `void` | `[onInitializeAccessibilityEvent](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#onInitializeAccessibilityEvent(AccessibilityEvent))(AccessibilityEvent accessibilityEvent)` | | `void` | `[onInitializeAccessibilityNodeInfo](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo))(AccessibilityNodeInfo info)` | | `void` | `[onMeasure](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#onMeasure(int,int))(int widthMeasureSpec, int heightMeasureSpec)` | | `void` | `[setBackground](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setBackground(Drawable))(Drawable drawable)` | | `void` | `[setBackgroundDrawable](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setBackgroundDrawable(Drawable))(Drawable drawable)` | | `void` | `[setCardBackgroundColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCardBackgroundColor(ColorStateList))(ColorStateList color)` | | `void` | `[setCardBackgroundColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCardBackgroundColor(int))(int color)` | | `void` | `[setCardElevation](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCardElevation(float))(float elevation)` | | `void` | `[setCardForegroundColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCardForegroundColor(ColorStateList))(ColorStateList foregroundColor)` Sets the foreground color for this card. | | `void` | `[setCheckable](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckable(boolean))(boolean checkable)` Sets whether this Card is checkable. | | `void` | `[setChecked](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setChecked(boolean))(boolean checked)` | | `void` | `[setCheckedIcon](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIcon(Drawable))(Drawable checkedIcon)` Sets this card's checked icon. | | `void` | `[setCheckedIconGravity](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconGravity(int))( @https://developer.android.com/reference/com/google/android/material/card/MaterialCardView.CheckedIconGravity int checkedIconGravity )` Sets the checked icon gravity for this card | | `void` | `[setCheckedIconMargin](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconMargin(int))(int checkedIconMargin)` | | `void` | `[setCheckedIconMarginResource](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconMarginResource(int))(int checkedIconMarginResId)` Sets the margin of the checked icon using a resource id. | | `void` | `[setCheckedIconResource](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconResource(int))(int id)` Sets this card's checked icon using a resource id. | | `void` | `[setCheckedIconSize](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconSize(int))(int checkedIconSize)` Sets the size of the checked icon | | `void` | `[setCheckedIconSizeResource](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconSizeResource(int))(int checkedIconSizeResId)` Sets the size of the checked icon using a resource id. | | `void` | `[setCheckedIconTint](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setCheckedIconTint(ColorStateList))(ColorStateList checkedIconTint)` Sets this checked icon color tint using the specified android.content.res.ColorStateList. | | `void` | `[setClickable](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setClickable(boolean))(boolean clickable)` | | `void` | `[setContentPadding](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setContentPadding(int,int,int,int))(int left, int top, int right, int bottom)` | | `void` | `[setDragged](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setDragged(boolean))(boolean dragged)` Call this when the Card is being dragged to apply the right color and elevation changes. | | `void` | `[setMaxCardElevation](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setMaxCardElevation(float))(float maxCardElevation)` | | `void` | `[setOnCheckedChangeListener](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setOnCheckedChangeListener(com.google.android.material.card.MaterialCardView.OnCheckedChangeListener))( https://developer.android.com/reference/com/google/android/material/card/MaterialCardView.OnCheckedChangeListener listener )` Register a callback to be invoked when the checked state of this Card changes. | | `void` | `[setPreventCornerOverlap](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setPreventCornerOverlap(boolean))(boolean preventCornerOverlap)` | | `void` | `[setProgress](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setProgress(float))(float progress)` Sets the interpolation on the Shape Path of the card. | | `void` | `[setRadius](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setRadius(float))(float radius)` | | `void` | `[setRippleColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setRippleColor(ColorStateList))(ColorStateList rippleColor)` Sets the ripple color for this card. | | `void` | `[setRippleColorResource](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setRippleColorResource(int))(int rippleColorResourceId)` Sets the ripple color resource for this card. | | `void` | `[setShapeAppearanceModel](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setShapeAppearanceModel(com.google.android.material.shape.ShapeAppearanceModel))(https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel shapeAppearanceModel)` Sets the `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel` that defines the shape. | | `void` | `[setStrokeColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setStrokeColor(ColorStateList))(ColorStateList strokeColor)` Sets the stroke color of this card view. | | `void` | `[setStrokeColor](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setStrokeColor(int))(int strokeColor)` Sets the stroke color of this card view. | | `void` | `[setStrokeWidth](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setStrokeWidth(int))(int strokeWidth)` Sets the stroke width of this card view. | | `void` | `[setUseCompatPadding](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#setUseCompatPadding(boolean))(boolean useCompatPadding)` | | `void` | `[toggle](https://developer.android.com/reference/com/google/android/material/card/MaterialCardView#toggle())()` | |

## Public constructors

### TransformationChildCard

```
public [TransformationChildCard](https://developer.android.com/reference/com/google/android/material/transformation/TransformationChildCard#TransformationChildCard(Context))(Context context)
```

### TransformationChildCard

```
public [TransformationChildCard](https://developer.android.com/reference/com/google/android/material/transformation/TransformationChildCard#TransformationChildCard(Context,AttributeSet))(Context context, AttributeSet attrs)
```