buttonSetSelectedColor.setOnClickListener {
val primary = ContextCompat.getColor(this, R.color.colorPrimary)
val accent = ContextCompat.getColor(this, R.color.colorAccent)
if (toggleButtonLayoutText.selectedColor == accent) {
toggleButtonLayoutText.selectedColor = primary
} else {
toggleButtonLayoutText.selectedColor = accent
}
}
buttonSetDividerColor.setOnClickListener {
val gray = Color.GRAY
val red = Color.RED
if (toggleButtonLayoutText.dividerColor == gray) {
toggleButtonLayoutText.dividerColor = red
} else {
toggleButtonLayoutText.dividerColor = gray
}
}
}