Switches are here! And they are super cool!
Switches are here! And they are super cool!
use app:showSwitch="true"
to show a Materialswitch when a card is collapsed.
You can listen to the state of the switch with
card.setOnSwitchChangeListener { view, isChecked ->
Toast.makeText(applicationContext, if(isChecked) "Checked!" else "Not checked!", Toast.LENGTH_SHORT).show()
}
Added more styling for titles
app:expandableCardTitleColor="@color/colorAccent"
app:expandableCardTitleBold="true"
app:expandableCardTitleSize="30"