{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ChipElevation

public final class ChipElevation


Represents the elevation used in a selectable chip in different states.

Note that this default implementation does not take into consideration the selectable state passed into its tonalElevation and shadowElevation. If you wish to apply that state, use a different SelectableChipElevation.

Note that its tonalElevation implementation only depends on elevation and disabledElevation

Summary

Public constructors

ChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

Public methods

boolean
equals(Object other)
final @NonNull Dp

the elevation used when the chip is not enabled

final @NonNull Dp

the elevation used when the chip is dragged

final @NonNull Dp

the elevation used when the chip is enabled.

final @NonNull Dp

the elevation used when the chip is focused

final @NonNull Dp

the elevation used when the chip is hovered

final @NonNull Dp

the elevation used when the chip is pressed.

int

Public constructors

ChipElevation

public ChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)
Parameters
@NonNull Dp elevation

the elevation used when the chip is enabled.

@NonNull Dp pressedElevation

the elevation used when the chip is pressed.

@NonNull Dp focusedElevation

the elevation used when the chip is focused

@NonNull Dp hoveredElevation

the elevation used when the chip is hovered

@NonNull Dp draggedElevation

the elevation used when the chip is dragged

@NonNull Dp disabledElevation

the elevation used when the chip is not enabled

Public methods

equals

public boolean equals(Object other)

getDisabledElevation

public final @NonNull Dp getDisabledElevation()

the elevation used when the chip is not enabled

getDraggedElevation

public final @NonNull Dp getDraggedElevation()

the elevation used when the chip is dragged

getElevation

public final @NonNull Dp getElevation()

the elevation used when the chip is enabled.

getFocusedElevation

public final @NonNull Dp getFocusedElevation()

the elevation used when the chip is focused

getHoveredElevation

public final @NonNull Dp getHoveredElevation()

the elevation used when the chip is hovered

getPressedElevation

public final @NonNull Dp getPressedElevation()

the elevation used when the chip is pressed.

hashCode

public int hashCode()