Skip to content

CheckBox

ZieIony edited this page Jul 14, 2017 · 6 revisions

Extends carbon.widget.TextView. JavaDoc

Features material check and uncheck animation.

Styles

<style name="carbon_CheckBox" parent="carbon_TextView">
    <item name="android:paddingLeft">12dp</item>
    <item name="android:paddingStart" tools:targetApi="jelly_bean_mr1">12dp</item>
    <item name="carbon_rippleColor">@null</item>
    <item name="android:textAppearance">?attr/carbon_textAppearanceBody1</item>
    <item name="android:drawablePadding">12dp</item>
    <item name="carbon_tint">@color/carbon_defaultIconColorPrimary</item>
    <item name="android:background">@null</item>
</style>

<style name="carbon_CheckBox.IconButton">
    <item name="carbon_rippleColor">?attr/carbon_rippleColor</item>
    <item name="carbon_rippleStyle">borderless</item>
    <item name="android:scaleType">center</item>
    <item name="android:clickable">true</item>
    <item name="android:layout_width">@dimen/carbon_toolbarItemSize</item>
    <item name="android:layout_height">@dimen/carbon_toolbarItemSize</item>
    <item name="android:paddingLeft">@null</item>
    <item name="android:paddingStart" tools:targetApi="jelly_bean_mr1">@null</item>
    <item name="android:padding">@dimen/carbon_toolbarItemPadding</item>
    <item name="android:drawablePadding">0dp</item>
    <item name="carbon_tint">@color/carbon_defaultIconColor</item>
</style>

<style name="carbon_CheckBox.IconButton.Inverse">
    <item name="carbon_rippleColor">?attr/carbon_rippleColorInverse</item>
    <item name="carbon_tint">@color/carbon_defaultIconColorInverse</item>
</style>
Clone this wiki locally