I don't know what I'm doing wrong in this code but it doesn't make the borders white and the background black. I want to make a line around the 5dp button that is white since the background is black.
activity xml
<Button
android:id="@+id/buttonSendMail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="179dp"
android:background="@drawable/button_join_discord"
android:text="Enviar "
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/messageID" />
xml button_join_discord of the button
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="3dp" />
<stroke android:width="5dp" android:color="@color/white" />
</shape>
</item>
</selector>
and it is that in the xml button_join_discord that I have done, the design appears with lines
Any idea what I'm doing wrong?
This is how it appears in the app, without white borders
this is my manifesto
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.turespawn"
>
<uses-permission android:name="android.permission.INTERNET" />
<meta-data
android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CL
ASS_NAME"
android:value="yourpackagename.CastOptionsProvider" />
<application
android:allowBackup="true"
android:icon="@drawable/tr_logo_1920"
android:label="@string/app_name"
android:roundIcon="@drawable/tr_logo_redondo_1920"
android:supportsRtl="true"
android:theme="@style/Theme.TuRespawn">
<activity
android:name=".HomeActivity"
android:exported="true" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
let's create a new
xml
typeShape
in the folderDrawable
and assign it to our button.button_design.xml:
And finally, we assign it to the button through the attribute:
Update:
change this in your manifest:
//drawable/style_button.xml
//Color.xml