Helpers-Extentions-Kotlin
Android Helpers classes and Extentions in Kotlin
Utility Helper
Method |
Description |
isInternetAvailable |
To check internet is connected or not |
isAppIsInBackground |
To check app in background or foreground |
showSoftKeyboard |
Show keyboard from any view |
hideSoftKeyboard |
Hide keyboard from any view |
addFragment |
To add fragment in activity |
replaceFragment |
To replace fragment in activity |
generateViewId |
Generate random id for view |
UI Helper
Method |
Description |
showAlertDialog |
Display alert dialog to show any alert message |
showSuccessSnackBar |
Display success message in bottom using snackbar |
showErrorSnackBar |
Display error message in bottom using snackbar |
showSuccessToast |
Display success message in top using toast |
showErrorToast |
Display error message in top using toast |
changeStatusBarColor |
To change statusbar color for activity |
showProgressBar |
Display progressbar for any background task |
hideProgressBar |
Hide progressbar for any background task |
showProgressDialog |
Display progress dialog for any background task |
hideProgressDialog |
Hide progress dialog for any background task |
showDatePicker |
Display date picker dialog |
showTimePicker |
Display time picker dialog |
Validity Helper
Method |
Description |
isStringValid |
Check string null, empty or not |
isEmailValid |
Check email is valid or not |
isPasswordValid |
Check password is according to given pattern or not |
LocalNotificationsHelper
Method |
Description |
sendNotification |
Send local notification according to given parameters |
clearNotifications |
Clear all app notifications |