I am making an UI on Android Studio.
I want to make a button with background image that I made.
Then I want to write some text on it.
However, when I set the background on button, it is just showing me black color.
I eidted theme.xml file to change status bar’s color to black.
This is the background that I want to apply on button.
This picture showing that background image is not applied as I intended.
This is theme.xml file which I edited to change status bar’s color.
2
Answers
I found solution for this kind of issue!
it is because of Material components in theme.xml.
all you need to add to fix this is:
Write this code in your theme.xml. Then reference it to your button.
I’ve experienced such before.
Change Button to appCompatButton