fun Context.alert(message: String, title: String? = "", positiveButton: String? = null, cancelable: Boolean = true, callback: (DialogInterface) -> Unit = {}): Builder
Display AlertDialog instantly fun Context.alert(message: String, title: String? = "", positiveButton: String? = null, cancelable: Boolean = true, callback: F1<DialogInterface>?): Builder
Display AlertDialog instantly for SAM Conversion |
|
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(message: String, callback: DialogInterface.() -> Unit, title: String? = "", positiveButton: String? = null, negativeButton: String? = null, cancelable: Boolean = true): Builder
Display AlertDialog instantly with confirm fun Context.confirm(message: String, callback: F1<DialogInterface>?, title: String? = "", positiveButton: String? = null, negativeButton: String? = null, cancelable: Boolean = true): Builder
Display AlertDialog instantly with confirm for SAM Conversion |
|
fun Context.copyAssets(path: String): Unit
Assets to Internal storage |
|
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.getAndroidId(): String
get androidId of device |
|
fun Context.getContactsList(): List<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(message: String, cancelable: Boolean = true, title: String? = null): 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): File? |
|
fun <T> Context.selector(items: List<T>, callback: (DialogInterface, item: T, Int) -> Unit, title: String? = "", cancelable: Boolean = true): Builder
Display SelectorDialog instantly fun <T> Context.selector(items: List<T>, callback: F3<DialogInterface, T, Int>?, title: String? = "", cancelable: Boolean = true): Builder
Display SelectorDialog instantly for SAM Conversion |
|
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 |