There is a button:
android:background="@drawable/login_button" android:textColor="@drawable/transparent_button_text_color"
In @drawable/login_button
I made it so that the color of the button changes while the button is pressed, and in fact you need to change the text color
In @drawable/transparent_button_text_color
wrote the following:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="false" android:drawable="@color/white" /> <item android:state_pressed="true" android:drawable="@color/black" /> </selector>
And here's the problem: in Design View, the color of the button is displayed in purple, and when I launch the application - an error
What am I doing wrong?