Toggle

public final class Toggle
extends Object

java.lang.Object
   ↳ androidx.car.app.model.Toggle


Represents a toggle that can have either a checked or unchecked state.

Summary

Nested classes

class Toggle.Builder

A builder of Toggle

interface Toggle.OnCheckedChangeListener

A listener for handling checked state change events. 

Public methods

boolean equals(Object other)
OnCheckedChangeDelegate getOnCheckedChangeDelegate()

Returns the OnCheckedChangeDelegate that is called when the checked state of the Toggle is changed.

int hashCode()
boolean isChecked()

Returns true if the toggle is checked.

String toString()

Inherited methods

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getOnCheckedChangeDelegate

public OnCheckedChangeDelegate getOnCheckedChangeDelegate ()

Returns the OnCheckedChangeDelegate that is called when the checked state of the Toggle is changed.

Returns
OnCheckedChangeDelegate

hashCode

public int hashCode ()

Returns
int

isChecked

public boolean isChecked ()

Returns true if the toggle is checked.

Returns
boolean

toString

public String toString ()

Returns
String