Skip to content

Small boilerplate code that adds Kotlin extension functions to Context. This allows you to quickly determine whether the device you are using is, for example, a phone or a tablet.

License

Notifications You must be signed in to change notification settings

DavidEdwards/AndroidScreenBoilerplate

Repository files navigation

CircleCI

AndroidScreenBoilerplate

Small boilerplate code that adds Kotlin extension functions to Context. This allows you to quickly determine whether the device you are using is, for example, a phone or a tablet.

Usage

Simply add this to your dependencies:

implementation 'com.github.DavidEdwards:AndroidScreenBoilerplate:1.0'

And make sure you have Jitpack enabled:

repositories {
    // ...
    maven { url "https://jitpack.io" }
}

Now you can use isPhone(), isTablet(), isTV(), isSmall() and isLarge() in your Activity, Fragment or other ContextWrapper objects.

About

Small boilerplate code that adds Kotlin extension functions to Context. This allows you to quickly determine whether the device you are using is, for example, a phone or a tablet.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages