Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 766 Bytes

File metadata and controls

23 lines (16 loc) · 766 Bytes

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.