If you want to keep the general styling (rounded corners etc.) and just change the background color then I use the backgroundTint property
android:backgroundTint="@android:color/holo_green_light"
More Related Contents:
- Coloring Buttons in Android with Material Design and AppCompat
- Android Material Design Button Styles
- Android button background is taking the primary color
- Android – border for button
- Button in custom Android Toast?
- Android Background Drawable Not Working in Button Since Android Studio 4.1
- Is any difference between a MaterialButton and a simple Button?
- Rounded corners on material button
- What is the difference between Android Material Design UI and Android UI without material design?
- Android: ListView elements with multiple clickable buttons
- Custom circle button
- Put constant text inside EditText which should be non-editable – Android
- Outlined Edit Text from Material Design
- Android “elevation” not showing a shadow
- How do I programmatically add buttons into layout one by one in several lines?
- How to custom switch button?
- Make an Android button change background on click through XML
- TextInputLayout not showing EditText hint before user focus on it
- Rounded Button in Android
- Android : change button text and background color
- how to Customize the Contextual Action Bar using appCompat in material design
- setSupportActionBar toolbar cannot be applied to (android.widget.Toolbar) error
- Material Design, AppCompat, and Backwards Compatibility
- How to make a round button?
- How to add button in ActionBar(Android)?
- Disable icon colorStateList in NavigationView
- How to avoid multiple button click at same time in android?
- Multi-State Toggle Button
- Best way to create a bottom toolbar in android.
- Android: Creating shaped button