Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

CheckBox

A UI component that displays a checkbox with text that the user can toggle. A android:id is required for the Interface clicked block to detect clicks. See Android documentation.

Note! This feature requires Android 12+.

AttributeValue typeDescription
android:buttondrawableImage used for the button. (Android 6+)
android:buttonTintcolorTint of the button drawable. (Android 6+)
android:buttonTintModeenumBlending mode of button tint: add, multiply, screen, src_atop, src_in or src_over. (Android 10+)
android:checkedbooleanWhether the button should be in the checked/on state.
AttributeValue typeDescription
android:autoLinkbooleanWhether URLs and email addresses in the text are automatically converted to clickable links.
android:cursorVisiblebooleanWhether cursor/caret is visible.
android:drawablePaddingdimensionSpace between the compound drawables and the text.
android:emsintegerMakes the view be exactly this many ems wide.
android:enabledbooleanWhether the widget is enabled.
android:fontFeatureSettingsstringFont feature settings, in the same format as the CSS font-feature-settings. (Android 5+)
android:fontVariationSettingsstringTrueType or OpenType font variation settings. (Android 8+)
android:freezesTextbooleanWhether the view includes its current text in its saved state.
android:gravityenumAlignment of the text within the view: bottom, center, center_horizontal, end, fill, fill_horizontal, fill_vertical, left, right, start and top.
android:heightdimensionMakes the view be exactly this tall.
android:hintstringText to display when the text is empty.
android:justificationModeenumMode for justification: inter_character, inter_word or none. (Android 8+)
android:letterSpacingfloatText letter-spacing. (Android 5+)
android:lineHeightdimensionExplicit line height for the view. (Android 9+)
android:linesintegerMakes the view be exactly this many lines tall.
android:linksClickablebooleanWhether links should be clickable.
android:maxEmsintegerMakes the view be at least this many ems wide.
android:maxHeightdimensionMakes the view be at most this many pixels tall.
android:maxLinesintegerMakes the view be at most this many lines tall.
android:maxWidthdimensionMakes the view be at least this many pixels wide.
android:minEmsintegerMakes the view be at least this many ems wide.
android:minHeightdimensionMakes the view be at least this tall.
android:minLinesintegerMakes the view be at least this many lines tall.
android:minWidthdimensionMakes the view be at least this wide.
android:selectAllOnFocusbooleanWhether to select all text when the view takes focus, if the text is selectable.
android:singleLinebooleanWhether to constrain the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines.
android:textstringText to display.
android:textAllCapsbooleanPresent the text in ALL CAPS, maybe as small-caps when available.
android:textColorcolorText color.
android:textColorHighlightcolorColor of the text selection highlight.
android:textColorHintcolorColor of the hint text.
android:textColorLinkcolorText color for links.
android:textScaleXfloatHorizontal scaling factor for the text.
android:textSelectHandledrawableImage used as anchor when positioning the cursor when selecting. URIs not supported.(Android 10+)
android:textSelectHandleLeftdrawableImage used as the left handle when selecting. URIs not supported. (Android 10+)
android:textSelectHandleRightdrawableImage used as the right handle when selecting. URIs not supported. (Android 10+)
android:textSizedimensionSize of the text, preferably in the sp unit.
android:widthdimensionMakes the view be exactly this wide.
AttributeValue typeDescription
android:accessibilityTraversalAfteridId of view that screen readers are requested to visit before this view. (Android 5.1+)
android:accessibilityTraversalBeforeidId of a view that screen readers are requested to visit after this view. (Android 5.1+)
android:alphafloatOpacity of the view, a decimal value between 0 and 1.
android:backgroundcolor or drawableBackground of the view. URIs not supported.
android:backgroundTintcolorTint of the background drawable (Android 12+)
android:backgroundTintModeenumBlending mode of foreground drawable tint: add, multiply, screen, src_atop, src_in or src_over. (Android 12+)
android:clickablebooleanWhether this view reacts to click events.
android:clipToOutlinebooleanWhether to use the views’ outline clip its contents.
android:contentDescriptionstringBrief description of the view content, primarily for accessibility.
android:elevationdimensionBase elevation of the view, often shown as a drop shadow. (Android 5+)
android:focusableenumWhether the view can take input focus: true, false or auto.
android:focusableInTouchModebooleanWhether the view can take input focus while in touch mode.
android:focusedByDefaultbooleanWhether the view is a default-focus view. (Android 8+)
android:foregroundGravityflagsGravity of the foreground drawable: bottom, center, center_horizontal, center_vertical, fill, fill_horizontal, fill_vertical, left, right and top. (Android 6+)
android:foregroundTintenumTint of the foreground drawable. (Android 12+)
android:foregroundTintModeenumBlending mode of foreground drawable tint: add, multiply, screen, src_atop, src_in or src_over. (Android 12+)
android:ididIdentifier name for this view.
android:labelForidId of a view for which this view serves as a label for. (Android 4.2+)
android:layoutDirectionenumDirection of layout drawing, usually associated with writing direction of the language: inherit, locale, ltr or rtl (Android 4.2+)
android:layout_gravityenumPosition of children within their bounds: bottom, center, center_horizontal, center_vertical, fill, fill_horizontal, fill_vertical, left, right and top. (Android 6+)
android:layout_heightenum or dimensionHeight of the view: match_parent or wrap_content, using a dimension requires Android 12+.
android:layout_margindimensionExtra space outside the edges of the view. (Android 12+)
android:layout_marginBottomdimensionExtra space outside the bottom edge of the view. (Android 12+)
android:layout_marginEnddimensionExtra space outside the end edge of the view. (Android 12+)
android:layout_marginHorizontaldimensionExtra space outside the left and right edge of the view. (Android 12+)
android:layout_marginLeftdimensionExtra space outside the left edge of the view. (Android 12+)
android:layout_marginRightdimensionExtra space outside the right edge of the view. (Android 12+)
android:layout_marginStartdimensionExtra space outside the start edge of the view. (Android 12+)
android:layout_marginTopdimensionExtra space outside the top edge of the view. (Android 12+)
android:layout_marginVerticaldimensionExtra space outside the top and bottom edge of the view. (Android 12+)
android:layout_weightintegerHow extra space is allocated to the view. An integer between 0 (stretch) and 5.
android:layout_widthenum or dimensionWidth of the view: match_parent, wrap_content, or on Android 12+ a dimension.
android:minHeightdimensionMinimum height of the view.
android:minWidthdimensionMinimum width of the view.
android:outlineRadiusdimensionCorner radius of view outline, see android:clipToOutline. (Android 12+)
android:paddingdimensionExtra space around the view. (Android 12+)
android:paddingBottomdimensionExtra space between the content bottom side and the view edge. (Android 12+)
android:paddingLeftdimensionExtra space between the content left side and the view edge. (Android 12+)
android:paddingRightdimensionExtra space between the content right side and the view edge. (Android 12+)
android:paddingTopdimensionExtra space between the content top side and the of the view edge. (Android 12+)
android:rotationfloatRotation of the view, in degrees.
android:rotationXfloatRotation of the view around the horizontal axis, in degrees.
android:rotationYfloatRotation of the view around the vertical axis, in degrees.
android:scaleXfloatHorizontal scale of the view.
android:scaleYfloatVertical scale of the view.
android:scrollIndicatorsenumScroll indicators to show, if scrolling is allowed: bottom, end, left, none, right, start or top.
android:supplementalDescriptionstringBrief supplemental information for the view, primarily for accessibility. (Android 16+)
android:transformPivotXfloatHorizontal point around which the view will rotate and scale.
android:transformPivotYfloatVertical point around which the view will rotate and scale.
android:translationXfloatHorizontal translation of the view.
android:translationYfloatVertical translation of the view.
android:translationZfloatElevation depth translation of the view.
android:visibilityenumVisibility of the view: gone, invisible or visible.
Note! This documentation is also accessible within the app from Help & feedback menu.