Skip to main content

Getting Started

Apply the following configuration in your Android project to start using the Android Utils library.

Gradle Setup

1. Add the following line in the settings.gradle file.

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

If your project uses an old version of Gradle, the line must be added in the Gradle file build.gradle at the project level.

allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}

2. Add the following line in the Gradle file build.gradle at the app level.

dependencies {
...
implementation 'com.github.JeovaniMartinez:Android-Utils:v1.0.0'
}
tip

Depending on your needs, you can use any other version of the library releases, the short commit hash, 'master-SNAPSHOT' or 'develop-SNAPSHOT'.


Style

The library can show some views, which follow the style of the app theme and have support for the light and dark theme, for these views to be shown with the app style it is necessary to declare the following style in the resources, which must inherit from the main app theme. The style must be added in the file themes.xml or styles.xml.

<!-- Android Utils library theme, used to preserve the app style. -->
<style name="AndroidUtilsTheme" parent="AppTheme" />
info

The name of the style resource must be exactly AndroidUtilsTheme