Linked Questions

Popular Questions

I need to change the stroke color from the app. The user is able to change the background color so I need to also let them change the stroke (outline) of the button. As its is already set in the drawable (sample below) I have not found a way to change this. Seems like all of the other questions like this just said to use the XML file.... but that doesnt let me make it dynamic. Thank you for any help!

I need to change the stroke color to a user defined color. Nothing to do with the state.

<?xml version="1.0" encoding="UTF-8"?> 
<shape xmlns:android=""> 

    <solid android:color="#ffffffff"/>    
                android:color="@color/Dim_Gray" />  <<<<--- This is what I need to change

    <padding android:left="10dp"

    <corners android:bottomRightRadius="12dp" android:bottomLeftRadius="12dp" 
     android:topLeftRadius="12dp" android:topRightRadius="12dp"/> 


Related Questions