Answers for "cant change button color when app run android studio"

0

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));
Posted by: Guest on March-10-2021
0

android studio change button color programmatically

Button11.setBackgroundColor(0xFFFF0000); // 0xAARRGGBB
Posted by: Guest on March-10-2021
-1

cant change button color when app run android studio

replace <Button with <androidx.appcompat.widget.AppCompatButton
Posted by: Guest on May-26-2021

Code answers related to "cant change button color when app run android studio"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language