Basic button patterns
Default button
The simplest CustomButton with no custom styling - inherits default Android button appearance.
Elegant outline
Transparent background with white outline - perfect for dark backgrounds.
Normal outline
Outline button with fill effect on press - the most common pattern.
Action buttons
Colored backgrounds for confirm/cancel actions with consistent styling.
Default button
A basic CustomButton without any custom attributes, using default Android styling.Elegant outline button
Transparent button with white outline - ideal for colored or image backgrounds.Normal outline button
Outline button that fills with color when pressed - the most versatile pattern.Confirm button
Green button for positive actions like save, submit, or confirm.Cancel button
Red button for destructive or cancel actions.Buttons with icons
Add icons to your buttons programmatically for enhanced visual communication.Right icon (Confirm)
Left icon with custom size (Cancel)
Layout integration
CustomButtons work seamlessly within any Android layout. Here’s how they’re used in the sample app.Centered in LinearLayout
Elegant button on colored background
Setting click listeners
CustomButton supports standard Android click listeners since it extendsAppCompatTextView.