lib / tv.smartclip.smartclientandroid.lib.utils / android.content.Context

Extensions for android.content.Context

getActivity

Returns the current Activity.

fun Context?.getActivity(): Activity?

getDisplaySize

Return current device display size.

fun Context.getDisplaySize(): Point

keepScreenOn

Sets the FLAG_KEEP_SCREEN_ON flag to the current window.

fun Context?.keepScreenOn(on: Boolean): Window?

screenHeight

Returns current device screen height.

fun Context.screenHeight(): Int

screenWidth

Returns current device screen width.

fun Context.screenWidth(): Int