kotlin change materialbutton icon color programmatically
val button = findViewById<MaterialButton>(R.id.btnShowDepartmentList)
button.setOnClickListener {
button.setIconTintResource(R.color.orangeLighter)
}
kotlin change materialbutton icon color programmatically
val button = findViewById<MaterialButton>(R.id.btnShowDepartmentList)
button.setOnClickListener {
button.setIconTintResource(R.color.orangeLighter)
}
android studio change button color programmatically
// If you're in an activity:
Button11.setBackgroundColor(getResources().getColor(R.color.red));
// OR, if you're not:
Button11.setBackgroundColor(Button11.getContext().getResources().getColor(R.color.red));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us