Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

button color wont change android studio

//Add this to your button xml element

android:background="@android:color/[INSERT_COLOR]"
//You might have to change the text color to make the text readable

//Change this line in both of the themes.xml files

<style name="Theme.[INSERT_APP_NAME]" parent="Theme.MaterialComponents.DayNight.DarkActionBar">

//to 

<style name="Theme.[INSERT_APP_NAME]" parent="Theme.AppCompat.DayNight.NoActionBar">

// you can change the .NoActionBar to light action bar or dark action bar if you want to
 
PREVIOUS NEXT
Tagged: #button #color #wont #change #android #studio
ADD COMMENT
Topic
Name
6+1 =