0
Hello people I have the following situation;
boot selected.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#DBDBDB" />
<corners android:radius="14dp" />
<stroke
android:width="1dp"
android:color="#DBDBDB" />
</shape>
boot.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#F2F2F2" />
<corners android:radius="14dp" />
<stroke
android:width="1dp"
android:color="#DBDBDB" />
</shape>
boot.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/botao_selecionado" android:state_pressed="true" /> <!-- pressionado -->
<item android:drawable="@drawable/botao_selecionado" android:state_focused="true" /> <!-- com foco -->
<item android:drawable="@drawable/botao_normal" /> <!-- normal-->
</selector>
I put.xml as background:
android:background="@drawable/botao"
Blz tested on my android 9 pie is ok, when I went to test on android 4.3 he didn’t even open the project: Dis that the project stopped, what will be this?
Have you tested in 4.3 without using this effect? It seems to me that the problem is not in it.
– ramaral
I tested yes, working perfectly without the effect.
– Ari Melo
I don’t see anything in xml that isn’t compatible with 4.3. You have to put the bug log in the question so you can know what the bug is.
– ramaral
Mostrou esse error:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.escala1002/com.example.escala1002.MainActivity}: android.view.InflateException: Binary XML file line #83: Error inflating class Button
– Ari Melo
I managed to resolve, the xml file created was as
v24
, then I copied its contents delete the file and created again, when I created was without thev24
dps file name, worked perfectly.– Ari Melo