Skip to main content
CustomButton is distributed via JitPack, making it easy to add to your Android project.

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’s build.gradle file:
1

Open your project-level build.gradle

Navigate to your project’s root directory and open build.gradle.
2

Add the JitPack repository

Add the JitPack maven repository to your repositories block:
build.gradle
repositories {
    maven { url 'https://jitpack.io' }
}
If you’re using a newer Gradle configuration with settings.gradle, add the repository there instead under dependencyResolutionManagement.

Add the dependency

Next, add the CustomButton dependency to your app module’s build.gradle file:
1

Open your app-level build.gradle

Navigate to app/build.gradle in your project.
2

Add the CustomButton dependency

Add the following line to your dependencies block:
build.gradle
implementation 'com.github.searchy2:CustomButton:latest-version'
Replace latest-version with the specific version you want to use, such as 1.9.2.
3

Sync your project

Click “Sync Now” in the banner that appears, or select File > Sync Project with Gradle Files from the menu.

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 complete build.gradle files should look like:
allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Verify installation

After syncing, verify the installation by importing CustomButton in your layout XML:
activity_main.xml
<stream.custombutton.CustomButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello CustomButton" />
If the import resolves without errors, you’ve successfully installed CustomButton.

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

Build docs developers (and LLMs) love