Package-level declarations

Types

Link copied to clipboard
enum Api : Enum<Api>

Properties

Link copied to clipboard
@get:RequiresApi(value = 28)
val Context.getVersionCode: Long

Functions

Link copied to clipboard
fun doIfSdk(version: Int, f: () -> Unit)

Execute f only if the current Android SDK version is version

fun doIfSdk(version: Int, f: () -> Unit, else: () -> Unit = {})

Execute f only if the current Android SDK version is version Optionally, execute else if the current Android SDK version doesn't match the provided one.

Link copied to clipboard
fun doStartingFromSdk(version: Int, f: () -> Unit)

Execute f only if the current Android SDK version is version or newer.

fun doStartingFromSdk(version: Int, f: () -> Unit, else: () -> Unit = {})

Execute f only if the current Android SDK version is version or newer. Optionally, execute else if the current Android SDK version is lower than the provided one.

Link copied to clipboard
inline fun doWithApi(api: Api, block: () -> Unit)
inline fun doWithApi(sdkCode: Int, block: () -> Unit)
Link copied to clipboard
inline fun doWithAtLeastApi(api: Api, block: () -> Unit)
inline fun doWithAtLeastApi(sdkCode: Int, block: () -> Unit)
Link copied to clipboard
inline fun doWithAtMostApi(api: Api, block: () -> Unit)
inline fun doWithAtMostApi(sdkCode: Int, block: () -> Unit)
Link copied to clipboard
inline fun doWithHigherApi(api: Api, block: () -> Unit)
inline fun doWithHigherApi(sdkCode: Int, block: () -> Unit)
Link copied to clipboard
inline fun doWithLowerApi(api: Api, block: () -> Unit)
inline fun doWithLowerApi(sdkCode: Int, block: () -> Unit)
Link copied to clipboard
inline fun fromApi(fromVersion: Int, inclusive: Boolean = true, action: () -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun toApi(toVersion: Int, inclusive: Boolean = false, action: () -> Unit)