General questions
What is the minimum Android API level supported?
What is the minimum Android API level supported?
Is CustomButton compatible with Material Design?
Is CustomButton compatible with Material Design?
What makes CustomButton different from standard Android buttons?
What makes CustomButton different from standard Android buttons?
Can I use CustomButton with ViewBinding or DataBinding?
Can I use CustomButton with ViewBinding or DataBinding?
Customization
What are the customization limits?
What are the customization limits?
- Background colors (default and selected states)
- Stroke colors and width (default and selected states)
- Text colors (default and selected states)
- Corner radius for rounded buttons
- All color states simultaneously with
setColor() - Left and right drawables with
setDrawableLeft()andsetDrawableRight() - Custom drawable sizes
- Press state with
setPressStatus()
AppCompatTextView, you also have access to all standard TextView properties like text size, font, padding, gravity, and more.Can I add icons or drawables to buttons?
Can I add icons or drawables to buttons?
Does CustomButton support elevation or shadows?
Does CustomButton support elevation or shadows?
Can I use gradient backgrounds?
Can I use gradient backgrounds?
- Set a gradient drawable as the background using standard Android background attributes
- Note that this may conflict with CustomButton’s color management
How do I create a button with rounded corners?
How do I create a button with rounded corners?
Performance
What is the performance impact of using CustomButton?
What is the performance impact of using CustomButton?
Can I use CustomButton in RecyclerView lists?
Can I use CustomButton in RecyclerView lists?
Migration
How do I migrate from standard Android buttons?
How do I migrate from standard Android buttons?
Is CustomButton compatible with my existing click listeners?
Is CustomButton compatible with my existing click listeners?
Troubleshooting
Why aren't my custom attributes working?
Why aren't my custom attributes working?
btn_cornerRadius or btn_strokeWidth aren’t working, check:-
Namespace declaration: Ensure you have the app namespace declared in your layout root:
-
Attribute prefix: Use
app:prefix, notandroid:: -
Library dependency: Verify CustomButton is properly added to your
build.gradle:
Why does my button look different on different Android versions?
Why does my button look different on different Android versions?
How do I report bugs or request features?
How do I report bugs or request features?
- File an issue on the GitHub repository
- Submit a pull request if you’ve implemented a feature or fix
- Check the Features Wishlist in the README for planned enhancements