Prerequisites
Before installing CustomButton, ensure you have:- Android Studio installed
- An Android project with minimum SDK version 15 (Android 4.0.3) or higher
- Gradle configured in your project
Add the repository
First, add the JitPack repository to your project’sbuild.gradle file:
Open your project-level build.gradle
Navigate to your project’s root directory and open
build.gradle.Add the dependency
Next, add the CustomButton dependency to your app module’sbuild.gradle file:
Add the CustomButton dependency
Add the following line to your dependencies block:Replace
build.gradle
latest-version with the specific version you want to use, such as 1.9.2.Version information
You can find the latest release version on the GitHub releases page.While using
latest-version is convenient, we recommend specifying an exact version number in production to ensure build reproducibility.Complete example
Here’s what your completebuild.gradle files should look like:
Verify installation
After syncing, verify the installation by importing CustomButton in your layout XML:activity_main.xml
Next steps
Now that you have CustomButton installed, you can:Quickstart guide
Create your first custom button in under 5 minutes
Customization guides
Learn about all available customization options