Kevin
05/14/2020, 3:48 PMvar isColorChanged: Boolean? = true;
fun changeScreenClick(view: View) {
if(isColorChanged==true){
view_menu_1.resources.getColor(R.color.Yellow)
}
else{
view_menu_2.resources.getDrawable(R.drawable.background_box)
}
}
Thank you!Saurabh
05/18/2020, 5:11 AMKevin
05/18/2020, 6:48 AMSaurabh
05/18/2020, 8:26 AMSaurabh
05/18/2020, 8:29 AMandroid:background="@drawable/selector"
. And then you can toggle state of the view like this
view.isEnabled = true/false
Based on the state the view currently is in, the correct background will be applied to the view.