@Override public int getVersion () { return Integer.parseInt(UIDevice.getCurrentDevice().getSystemVersion().split("\\.")[0]); }
int getIosVersion () { String systemVersion = UIDevice.getCurrentDevice().getSystemVersion(); int version = Integer.parseInt(systemVersion.split("\\.")[0]); return version; }
int getIosVersion () { String systemVersion = UIDevice.getCurrentDevice().getSystemVersion(); int version = Integer.parseInt(systemVersion.split("\\.")[0]); return version; }
@Override public int getVersion () { return Integer.parseInt(UIDevice.getCurrentDevice().getSystemVersion().split("\\.")[0]); }
/** * Retrieve and store the device system version. */ @WeaklyLinked private static void fetchSystemVersion() { String version = UIDevice.getCurrentDevice().getSystemVersion(); systemVersionString = version; if (version != null) { String[] parts = version.split("\\."); if (parts.length > 0) majorSystemVersion = Integer.valueOf(parts[0]); if (parts.length > 1) minorSystemVersion = Integer.valueOf(parts[1]); if (parts.length > 2) patchSystemVersion = Integer.valueOf(parts[2]); } else { // Default to minimum OS version that RoboVM supports. majorSystemVersion = 6; } }
void setupPeripherals () { //motionManager = new CMMotionManager(); setupAccelerometer(); setupCompass(); UIDevice device = UIDevice.getCurrentDevice(); if (device.getModel().equalsIgnoreCase("iphone")) hasVibrator = true; if (app.getIosVersion() >= 9){ UIForceTouchCapability forceTouchCapability = UIScreen.getMainScreen().getTraitCollection().getForceTouchCapability(); pressureSupported = forceTouchCapability == UIForceTouchCapability.Available; } }
void setupPeripherals () { //motionManager = new CMMotionManager(); setupAccelerometer(); setupCompass(); UIDevice device = UIDevice.getCurrentDevice(); if (device.getModel().equalsIgnoreCase("iphone")) hasVibrator = true; if (app.getIosVersion() >= 9){ UIForceTouchCapability forceTouchCapability = UIScreen.getMainScreen().getTraitCollection().getForceTouchCapability(); pressureSupported = forceTouchCapability == UIForceTouchCapability.Available; } }
Gdx.app.debug("IOSApplication", "iOS version: " + UIDevice.getCurrentDevice().getSystemVersion()); if (scale >= 2.0f) { Gdx.app.debug("IOSApplication", "scale: " + scale); if (UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad) { if (UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad) {
Gdx.app.debug("IOSApplication", "iOS version: " + UIDevice.getCurrentDevice().getSystemVersion()); if (scale >= 2.0f) { Gdx.app.debug("IOSApplication", "scale: " + scale); if (UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad) { if (UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad) {
private int getOSVersion () { String systemVersion = UIDevice.getCurrentDevice().getSystemVersion(); int version = Integer.parseInt(systemVersion.split("\\.")[0]); return version; } }
int getIosVersion () { String systemVersion = UIDevice.getCurrentDevice().getSystemVersion(); int version = Integer.parseInt(systemVersion.split("\\.")[0]); return version; }
private int getOSVersion () { String systemVersion = UIDevice.getCurrentDevice().getSystemVersion(); int version = Integer.parseInt(systemVersion.split("\\.")[0]); return version; } }
private static boolean useHalfSize (RoboPlatform.Config config) { boolean isPad = UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad; return isPad && config.iPadLikePhone; } private static Scale viewScale (RoboPlatform.Config config) {
@Override public int getVersion () { return Integer.parseInt(UIDevice.getCurrentDevice().getSystemVersion().split("\\.")[0]); }
/** * Retrieve and store the device system version. */ @WeaklyLinked private static void fetchSystemVersion() { String version = UIDevice.getCurrentDevice().getSystemVersion(); systemVersionString = version; if (version != null) { String[] parts = version.split("\\."); if (parts.length > 0) majorSystemVersion = Integer.valueOf(parts[0]); if (parts.length > 1) minorSystemVersion = Integer.valueOf(parts[1]); if (parts.length > 2) patchSystemVersion = Integer.valueOf(parts[2]); } else { // Default to minimum OS version that RoboVM supports. majorSystemVersion = 6; } }
/** * Retrieve and store the device system version. */ @WeaklyLinked private static void fetchSystemVersion() { String version = UIDevice.getCurrentDevice().getSystemVersion(); systemVersionString = version; if (version != null) { String[] parts = version.split("\\."); if (parts.length > 0) majorSystemVersion = Integer.valueOf(parts[0]); if (parts.length > 1) minorSystemVersion = Integer.valueOf(parts[1]); if (parts.length > 2) patchSystemVersion = Integer.valueOf(parts[2]); } else { // Default to minimum OS version that RoboVM supports. majorSystemVersion = 6; } }
void setupPeripherals () { //motionManager = new CMMotionManager(); setupAccelerometer(); setupCompass(); UIDevice device = UIDevice.getCurrentDevice(); if (device.getModel().equalsIgnoreCase("iphone")) hasVibrator = true; if (app.getIosVersion() >= 9){ UIForceTouchCapability forceTouchCapability = UIScreen.getMainScreen().getTraitCollection().getForceTouchCapability(); pressureSupported = forceTouchCapability == UIForceTouchCapability.Available; } }
void boundsChanged(CGRect bounds) { viewportChanged(scale().scaledCeil((float)bounds.getWidth()), scale().scaledCeil((float)bounds.getHeight())); orientDetailM.update(toOrientationDetail(UIDevice.getCurrentDevice().getOrientation())); }
public RoboGraphics(RoboPlatform platform, CGRect bounds) { this.platform = platform; float deviceScale = (float)((platform.osVersion >= 8) ? UIScreen.getMainScreen().getNativeScale() : UIScreen.getMainScreen().getScale()); boolean isPad = UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad; boolean useHalfSize = isPad && platform.config.iPadLikePhone; float viewScale = (useHalfSize ? 2 : 1) * deviceScale; this.deviceScale = deviceScale; ctx = new RoboGLContext(platform, new RoboGL20(), viewScale); setSize(bounds); rootLayer = new GroupLayerGL(ctx); }
Gdx.app.debug("IOSApplication", "iOS version: " + UIDevice.getCurrentDevice().getSystemVersion()); if (scale >= 2.0f) { Gdx.app.debug("IOSApplication", "scale: " + scale); if (UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad) { if (UIDevice.getCurrentDevice().getUserInterfaceIdiom() == UIUserInterfaceIdiom.Pad) {