AppCompatToggleButton


class AppCompatToggleButton : ToggleButton, TintableBackgroundView, EmojiCompatConfigurationView, TintableCompoundDrawablesView


A ToggleButton which supports compatible features on older versions of the platform, including:

This will automatically be used when you use ToggleButton in your layouts. You should only need to manually use this class when writing custom views.

Summary

Public constructors

AppCompatToggleButton(
    context: Context,
    attrs: AttributeSet?,
    defStyleAttr: Int
)

Public functions

Boolean
Unit
setAllCaps(allCaps: Boolean)
Unit

This function is deprecated.

Unit
Unit
setCompoundDrawables(
    left: Drawable?,
    top: Drawable?,
    right: Drawable?,
    bottom: Drawable?
)
Unit
setCompoundDrawablesRelative(
    start: Drawable?,
    top: Drawable?,
    end: Drawable?,
    bottom: Drawable?
)
Unit

Configure emoji fallback behavior using EmojiCompat.

Unit

Protected functions

Unit

Inherited Constants

From android.widget.TextView
From android.view.View
const Int
const Int
const Int
const Int
const Int
const Int
const Property<View!, Float!>!
const Int
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE = "creditCardExpirationDate"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY = "creditCardExpirationDay"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = "creditCardExpirationMonth"
const String!
AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = "creditCardExpirationYear"
const String!
const String!
AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE = "creditCardSecurityCode"
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
GONE = 8
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
KEEP_SCREEN_ON = 67108864
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
NO_ID = -1
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int
const Int
const Int
const Float
const Float
const Float
const Float
const Float
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const IntArray<Int>!
const IntArray<Int>!
const Int
const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Int
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const String!
VIEW_LOG_TAG = "View"
const Int
const IntArray<Int>!
const Property<View!, Float!>!
const Property<View!, Float!>!
const Property<View!, Float!>!

Inherited functions

From android.widget.Button
PointerIcon!
onResolvePointerIcon(event: MotionEvent!, pointerIndex: Int)
From android.widget.CompoundButton
From android.widget.TextView
Unit
addExtraDataToAccessibilityNodeInfo(
    info: AccessibilityNodeInfo!,
    extraDataKey: String!,
    arguments: Bundle!
)
Unit
Unit
Unit
Boolean
Unit
Unit
Int
Unit
Int
Int
Unit
debug(depth: Int)
Boolean
Unit
Boolean
Unit
findViewsWithText(
    outViews: ArrayList<View!>!,
    searched: CharSequence!,
    flags: Int
)
Int
Int
Int
Int
IntArray<Int>!
Int
Array<String!>!
Int
Int
Int
Int
BlendMode!
ColorStateList!
PorterDuff.Mode!
Array<Drawable!>!
Array<Drawable!>!
Int
Int
Int
Int
Int
Int
ActionMode.Callback!
ActionMode.Callback!
Boolean
MovementMethod!
Editable!
TextUtils.TruncateAt!
CharSequence!
Int
Int
Array<InputFilter!>!
Int
Unit
Int
Int
String!
String!
Boolean
Int
Int
Highlights!
CharSequence!
ColorStateList!
Int
Int
CharSequence!
LocaleList!
Int
Boolean
Bundle!
Int
Int
KeyListener!
Int
Layout!
Float
Int
Float
Int
getLineBounds(line: Int, bounds: Rect!)
Int
Int
Int
Int
Float
Float
ColorStateList!
Boolean
Int
Int
Int
Int
Int
Int
Int
Int
Int
Paint.FontMetrics!
MovementMethod!
Int
TextPaint!
Int
String!
Float
Int
Int
IntArray<Int>!
Int
Int
Int
Float
Float
Float
Boolean
Boolean
CharSequence!
TextClassifier!
ColorStateList!
Drawable!
TextDirectionHeuristic!
Locale!
LocaleList!
PrecomputedText.Params!
Float
Drawable!
Drawable!
Drawable!
Float
Int
Int
Int
Int
Int
Int
Int
Int
TransformationMethod!
Typeface!
Array<URLSpan!>!
Boolean
Boolean
Boolean
Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Int
Boolean
Unit
Unit
Boolean
Unit
Unit
Unit
Unit
InputConnection!
Unit
onCreateViewTranslationRequest(
    supportedFormats: IntArray!,
    requestsCollector: Consumer<ViewTranslationRequest!>!
)
Boolean
Unit
onEditorAction(actionCode: Int)
Unit
Unit
onFocusChanged(
    focused: Boolean,
    direction: Int,
    previouslyFocusedRect: Rect!
)
Boolean
Boolean
onKeyDown(keyCode: Int, event: KeyEvent!)
Boolean
onKeyMultiple(keyCode: Int, repeatCount: Int, event: KeyEvent!)
Boolean
onKeyPreIme(keyCode: Int, event: KeyEvent!)
Boolean
onKeyShortcut(keyCode: Int, event: KeyEvent!)
Boolean
onKeyUp(keyCode: Int, event: KeyEvent!)
Unit
onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)
Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Boolean
Boolean
onPrivateIMECommand(action: String!, data: Bundle!)
ContentInfo!
Unit
onRtlPropertiesChanged(layoutDirection: Int)
Unit
onScreenStateChanged(screenState: Int)
Unit
onScrollChanged(horiz: Int, vert: Int, oldHoriz: Int, oldVert: Int)
Unit
onSelectionChanged(selStart: Int, selEnd: Int)
Unit
onTextChanged(
    text: CharSequence!,
    start: Int,
    lengthBefore: Int,
    lengthAfter: Int
)
Boolean
Boolean
Boolean
Unit
Unit
onVisibilityChanged(changedView: View!, visibility: Int)
Unit
onWindowFocusChanged(hasWindowFocus: Boolean)
Boolean
Unit
Unit
Unit
Unit
setAutoSizeTextTypeUniformWithConfiguration(
    autoSizeMinTextSize: Int,
    autoSizeMaxTextSize: Int,
    autoSizeStepGranularity: Int,
    unit: Int
)
Unit
setAutoSizeTextTypeUniformWithPresetSizes(
    presetSizes: IntArray!,
    unit: Int
)
Unit
Unit
setBreakStrategy(breakStrategy: Int)
Unit
Unit
Unit
Unit
Unit
setCompoundDrawablesRelativeWithIntrinsicBounds(
    start: Drawable!,
    top: Drawable!,
    end: Drawable!,
    bottom: Drawable!
)
Unit
setCompoundDrawablesWithIntrinsicBounds(
    left: Drawable!,
    top: Drawable!,
    right: Drawable!,
    bottom: Drawable!
)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
setEms(ems: Int)
Unit
setEnabled(enabled: Boolean)
Unit
Unit
Unit
Unit
setFirstBaselineToTopHeight(firstBaselineToTopHeight: Int)
Unit
Unit
Unit
setFontFeatureSettings(fontFeatureSettings: String!)
Boolean
setFontVariationSettings(fontVariationSettings: String!)
Boolean
setFrame(l: Int, t: Int, r: Int, b: Int)
Unit
setFreezesText(freezesText: Boolean)
Unit
setGravity(gravity: Int)
Unit
setHeight(pixels: Int)
Unit
Unit
setHighlights(highlights: Highlights!)
Unit
setHint(resid: Int)
Unit
Unit
Unit
setHyphenationFrequency(hyphenationFrequency: Int)
Unit
setImeActionLabel(label: CharSequence!, actionId: Int)
Unit
Unit
setImeOptions(imeOptions: Int)
Unit
Unit
setInputExtras(xmlResId: Int)
Unit
Unit
setJustificationMode(justificationMode: Int)
Unit
Unit
setLastBaselineToBottomHeight(lastBaselineToBottomHeight: Int)
Unit
setLetterSpacing(letterSpacing: Float)
Unit
setLineBreakStyle(lineBreakStyle: Int)
Unit
setLineBreakWordStyle(lineBreakWordStyle: Int)
Unit
setLineHeight(lineHeight: Int)
Unit
setLineSpacing(add: Float, mult: Float)
Unit
setLines(lines: Int)
Unit
Unit
Unit
Unit
setMarqueeRepeatLimit(marqueeLimit: Int)
Unit
setMaxEms(maxEms: Int)
Unit
setMaxHeight(maxPixels: Int)
Unit
setMaxLines(maxLines: Int)
Unit
setMaxWidth(maxPixels: Int)
Unit
setMinEms(minEms: Int)
Unit
setMinHeight(minPixels: Int)
Unit
setMinLines(minLines: Int)
Unit
setMinWidth(minPixels: Int)
Unit
Unit
Unit
Unit
setPadding(left: Int, top: Int, right: Int, bottom: Int)
Unit
setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
setSelectAllOnFocus(selectAllOnFocus: Boolean)
Unit
setSelected(selected: Boolean)
Unit
setShadowLayer(radius: Float, dx: Float, dy: Float, color: Int)
Unit
setShiftDrawingOffsetForStartOverhang(
    shiftDrawingOffsetForStartOverhang: Boolean
)
Unit
Unit
Unit
Unit
setText(text: CharArray!, start: Int, len: Int)
Unit
setTextAppearance(context: Context!, resId: Int)

This function is deprecated.

Unit
Unit
Unit
setTextCursorDrawable(textCursorDrawable: Drawable!)
Unit
Unit
Unit
Unit
Unit
Unit
Unit
setTextSelectHandle(textSelectHandle: Drawable!)
Unit
setTextSelectHandleLeft(textSelectHandleLeft: Drawable!)
Unit
setTextSelectHandleRight(textSelectHandleRight: Drawable!)
Unit
Unit
Unit
Unit
setUseBoundsForWidth(useBoundsForWidth: Boolean)
Unit
setWidth(pixels: Int)
Boolean
From android.widget.ToggleButton
From android.view.View
Unit
Unit
addFocusables(views: ArrayList<View!>!, direction: Int)
Unit
addKeyboardNavigationClusters(
    views: (Mutable)Collection<View!>!,
    direction: Int
)
Unit
Unit
Unit
Unit
ViewPropertyAnimator!
Unit

This function is deprecated.

Boolean
Unit
Unit

This function is deprecated.

Unit
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Unit
Unit
Boolean
Unit
Unit
Unit
Unit
java-static Int
combineMeasuredStates(curState: Int, newState: Int)
Int
Int
WindowInsets!
computeSystemWindowInsets(in: WindowInsets!, outLocalInsets: Rect!)
Int
AccessibilityNodeInfo!
Unit
Unit

This function is deprecated.

WindowInsets!
Boolean
Unit
Unit
dispatchCreateViewTranslationRequest(
    viewIds: (Mutable)Map<AutofillId!, LongArray!>!,
    supportedFormats: IntArray!,
    capability: TranslationCapability!,
    requests: (Mutable)List<ViewTranslationRequest!>!
)
Unit
Boolean
Unit
dispatchDraw(canvas: Canvas!)
Unit