I was looking for how to create rounded buttons and it's simple enough. But I would like to be able to pass the color property to the drawable so that I can pass a different color for various buttons in the app instead of having to create a separate drawable xml for each color. In wpf we could reference the properties passed in using bindings, but I'm not sure what the proper method is in android.
button_rounded.xml
<Button
color = "white"
android:background="@drawable/rounded_button"
/>
<Button
color = "blue"
android:background="@drawable/rounded_button"
/>
I want to be able to pass the color from xml to the drawable rounded button so that I can maintain only one xml file. Is this possible in android?