fun Context.alert(title: String? = "", message: String, positiveButton: String? = null, cancelable: Boolean = true, callback: DialogInterface.() -> Unit = {}): Builder
Display AlertDialog instantly |
|
fun Context.applyUnReadCount(count: Int): Unit
apply count of UnRead |
|
fun Context.bitmapToDrawable(bitmap: Bitmap?): Drawable?
Bitmap to Drawable |
|
fun Context.checkNetwork(): Int
get network connection check |
|
fun Context.confirm(title: String? = "", message: String, positiveButton: String? = null, negativeButton: String? = null, cancelable: Boolean = true, callback: DialogInterface.() -> Unit): Builder
Display AlertDialog instantly with confirm |
|
fun Context.copyText(text: CharSequence): Unit
copy text to clipboard |
|
fun Context.dimen(resource: Int): Int
get pixel size from DimenRes |
|
fun Context.dip2px(value: Int): Int fun Context.dip2px(value: Float): Int
convert dip to px |
|
fun Context.downloadFile(urlPath: String, name: String): Uri?
Download file from uri |
|
fun Context.getAndroidId(): String
get androidId of device |
|
fun Context.getContactsList(): ArrayList<ContactItem>
load contact data from device |
|
fun Context.getIMEI(): String
get IMEI of device |
|
fun Context.getKeyHash(): String
get key hash of application |
|
fun Context.getLine1Number(): String
get Line1Number (as know as PhoneNumber) of device |
|
fun Context.getStatusBarHeight(): Int
get Height of status bar |
|
fun Context.getTextFromClipboard(): String
get text of clipboard list |
|
fun Context.inflate(layoutRes: Int, parent: ViewGroup? = null, attachToRoot: Boolean = false): View
inflate view |
|
fun Context.progress(title: String? = null, message: String): DialogInterface
Display ProgressDialog |
|
fun Context.px2dip(px: Int): Float
convert px to dip |
|
fun Context.px2sp(px: Int): Float
convert px to sp |
|
fun Context.reboot(restartIntent: Intent = this.packageManager.getLaunchIntentForPackage(this.packageName)): Unit
Reboot application |
|
fun Context.removeUnReadCount(): Unit
remove count of UnRead |
|
fun Context.requestMediaScanner(url: String): Unit
Request MediaScanning |
|
fun Context.saveBitmapToFile(bitmap: Bitmap): String?
Save Bitmap to file |
|
fun Context.selector(title: String? = "", items: List<CharSequence>, cancelable: Boolean = true, callback: (DialogInterface, Int) -> Unit): Builder fun <T> Context.selector(title: String? = "", items: List<T>, cancelable: Boolean = true, callback: (DialogInterface, item: T, Int) -> Unit): Builder
Display SelectorDialog instantly |
|
fun Context.setTypeface(layoutRes: Int, parent: ViewGroup? = null, isAttachedRoot: Boolean = false): View? fun Context.setTypeface(view: ViewGroup, parent: ViewGroup? = null, isAttachedRoot: Boolean = false): View?
Set system font into ViewGroup |
|
fun Context.sp2px(value: Int): Int fun Context.sp2px(value: Float): Int
convert sp to px |
|
fun Context.toast(message: String, length: Int = Toast.LENGTH_SHORT): Unit fun Context.toast(message: Int, length: Int = Toast.LENGTH_SHORT): Unit
Display Toast Message |
|
fun Context.versionCode(): Int
get version code of this application |
|
fun Context.versionName(): String
get version name of this application |
|
fun Context.vibrate(millSec: Long): Unit fun Context.vibrate(pattern: LongArray, repeat: Int = -1): Unit
Vibrate need VIBRATE permission |