Skip to content

Context

Artem Glugovsky edited this page Mar 2, 2017 · 2 revisions

inline fun Context.intentFor( ... ): Intent

inline fun Context.startActivity( ... )

fun Context.openLink(url: String)

fun Context.openLink(uri: Uri)

inline fun Context.startService( ... )

inline fun Context.pendingIntentFor( ... ): PendingIntent

fun Context.showShortToast(@StringRes resId: Int)

fun Context.showShortToast(text: String)

fun Context.showLongToast(@StringRes resId: Int)

fun Context.showLongToast(text: String)

fun Context.getAnimation(@AnimRes id: Int): Animation

fun Context.getAnimator(@AnimatorRes id: Int): Animator

fun Context.getThemedColor(@ColorRes resId: Int): Int

fun Context.getThemedColorStateList(@ColorRes resId: Int): ColorStateList

fun Context.getThemedDrawable(@DrawableRes resId: Int): Drawable

fun Context.isPermissionsGranted(vararg permissions: Permission): Boolean

fun Context.isPermissionsGranted(vararg permissions: String): Boolean

val Context.isRtl: Boolean

val Context.isLtr: Boolean

val Context.isLandscape: Boolean

val Context.isPortrait: Boolean

fun Context.convertToDp(pixels: Int): Int

fun Context.convertToSp(pixels: Int): Int

fun Context.isPackageInstalled(packageName: String): Boolean

val Context.hasConnection: Boolean

val Context.isConnectedToWifi: Boolean

val Context.isConnectedToMobile: Boolean