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; } }
final CGRect screenBounds = UIScreen.getMainScreen().getBounds(); final CGRect statusBarFrame = uiApp.getStatusBarFrame(); final UIInterfaceOrientation statusBarOrientation = uiApp.getStatusBarOrientation();
final CGRect screenBounds = UIScreen.getMainScreen().getBounds(); final CGRect statusBarFrame = uiApp.getStatusBarFrame(); final UIInterfaceOrientation statusBarOrientation = uiApp.getStatusBarOrientation();
float scale = (float)(getIosVersion() >= 8 ? UIScreen.getMainScreen().getNativeScale() : UIScreen.getMainScreen() .getScale()); if (scale >= 2.0f) { this.uiWindow = new UIWindow(UIScreen.getMainScreen().getBounds()); this.uiWindow.setRootViewController(this.graphics.viewController); this.uiWindow.makeKeyAndVisible();
float scale = (float)(getIosVersion() >= 8 ? UIScreen.getMainScreen().getNativeScale() : UIScreen.getMainScreen() .getScale()); if (scale >= 2.0f) { this.uiWindow = new UIWindow(UIScreen.getMainScreen().getBounds()); this.uiWindow.setRootViewController(this.graphics.viewController); this.uiWindow.makeKeyAndVisible();
private static Scale viewScale (RoboPlatform.Config config) { float deviceScale = (float)UIScreen.getMainScreen().getScale(); boolean useHalfSize = useHalfSize(config); return new Scale((useHalfSize ? 2 : 1) * deviceScale); }
@Override public IDimension screenSize() { // we just recompute this when asked so that we have the right orientation // TODO: is this properly resolution independent? CGRect screenBounds = UIScreen.getMainScreen().getBounds(); // TODO: (plat.osVersion < 8) manually divide by scale factor? // tODO: (plat.osVersion < 8) manually flip width/height when in landscape? screenSize.width = (int)screenBounds.getWidth(); screenSize.height = (int)screenBounds.getHeight(); if (useHalfSize(config)) { screenSize.width /= 2; screenSize.height /= 2; } return screenSize; }
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); }
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; } }
public WindowAlertController(String title, String message, UIAlertControllerStyle preferredStyle) { super(title, message, preferredStyle); alertWindow = new UIWindow(UIScreen.getMainScreen().getBounds()); alertWindow.setRootViewController(new UIViewController()); alertWindow.setWindowLevel(UIWindowLevel.Alert + 1); }
IOSProgressDialog(ProgressDialog.Builder builder) { super(UIScreen.getMainScreen().getBounds()); this.style = builder.style; setupLabels(builder); setupIndicators(); alertWindow = new UIWindow(UIScreen.getMainScreen().getBounds()); alertWindow.setRootViewController(new UIViewController()); alertWindow.setWindowLevel(UIWindowLevel.Alert + 1); setContentMode(UIViewContentMode.Center); setAutoresizingMask( UIViewAutoresizing.with(UIViewAutoresizing.FlexibleTopMargin, UIViewAutoresizing.FlexibleBottomMargin, UIViewAutoresizing.FlexibleLeftMargin, UIViewAutoresizing.FlexibleRightMargin)); // Transparent background setOpaque(false); setBackgroundColor(UIColor.clear()); setAlpha(0); }
protected RoboPlatform(CGRect bounds, Config config) { super(new RoboLog()); this.config = config; bounds = bounds != null ? bounds : UIScreen.getMainScreen().getBounds(); graphics = new RoboGraphics(this, bounds); json = new JsonImpl(); keyboard = new RoboKeyboard(this); net = new RoboNet(this); pointer = new RoboPointer(this); touch = new RoboTouch(this); assets = new RoboAssets(this); storage = new RoboStorage(this); }
final CGRect screenBounds = UIScreen.getMainScreen().getBounds(); final CGRect statusBarFrame = uiApp.getStatusBarFrame(); final UIInterfaceOrientation statusBarOrientation = uiApp.getStatusBarOrientation();
float scale = (float)(getIosVersion() >= 8 ? UIScreen.getMainScreen().getNativeScale() : UIScreen.getMainScreen() .getScale()); if (scale >= 2.0f) { this.uiWindow = new UIWindow(UIScreen.getMainScreen().getBounds()); this.uiWindow.setRootViewController(this.graphics.viewController); this.uiWindow.makeKeyAndVisible();
if(textFieldHashMap==null){ textFieldHashMap=new HashMap<>(); screenSize=UIScreen.getMainScreen().getBounds().getSize();