Last active
June 14, 2017 07:48
-
-
Save EddyVerbruggen/82465c796b857539b2da131cbd64f46f to your computer and use it in GitHub Desktop.
Determine running on a tablet in NativeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// required imports: | |
import { DeviceType } from "ui/enums"; | |
import { device } from "platform"; | |
// then wherever you need it: | |
const isTablet: boolean = device.deviceType === DeviceType.Tablet; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment