Skip to content

Latest commit

 

History

History
54 lines (45 loc) · 1.21 KB

README.md

File metadata and controls

54 lines (45 loc) · 1.21 KB

App Utility

An android library which provides utility methods to perform various types of common actions in app i.e. validations, toasts, widget related utilities etc.

Integration

Add it to your build.gradle with:

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

and:

dependencies {
    compile 'com.github.mohitrajput987:app-utility:v1.1.0'
}

Simple to use like below:

if(CommonUtils.isNetworkAvailable(context)){
    // Call web service
}else{
    ToastUtils.showShortToast(context, R.string.network_not_available);
}
if(ValidationUtils.isEmailValid("[email protected]")){
    // Perform task
}else{
    ToastUtils.showShortToast(context, R.string.invalid_email);
}

Types of util claases-

1. Validations-

Email, mobile, zipcode, name, url etc.

2. Toast-

Methods to show toast messages easiliy without writing much code.

3. Common-

Internet availability, max length, bitmap etc.

4. Location-

Location related methods.

5. Shared Preference -

Easy way to use shared preference in app.

Javadoc

You can read complete details about all classes and their methods in javadoc