/** * @since Available in iOS 8.0 and later. */ public static NSObject observeDidEnterBackground(UIViewController object, final VoidBlock1<UIViewController> block) { return NSNotificationCenter.getDefaultCenter().addObserver(ShowDetailTargetDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((UIViewController)a.getObject()); } }); } }
public UIViewController(String nibNameOrNil, NSBundle nibBundleOrNil) { super((SkipInit) null); initObject(init(nibNameOrNil, nibBundleOrNil)); } public UIViewController(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }
private void createDefaultTextField () { textfield = new UITextField(new CGRect(10, 10, 100, 50)); //Parameters // Setting parameters textfield.setKeyboardType(UIKeyboardType.Default); textfield.setReturnKeyType(UIReturnKeyType.Done); textfield.setAutocapitalizationType(UITextAutocapitalizationType.None); textfield.setAutocorrectionType(UITextAutocorrectionType.No); textfield.setSpellCheckingType(UITextSpellCheckingType.No); textfield.setHidden(true); // Text field needs to have at least one symbol - so we can use backspace textfield.setText("x"); app.getUIViewController().getView().addSubview(textfield); }
public void show() { alertWindow.makeKeyAndVisible(); alertWindow.getRootViewController().presentViewController(this, true, null); }
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); }
private void createDefaultTextField () { textfield = new UITextField(new CGRect(10, 10, 100, 50)); //Parameters // Setting parameters textfield.setKeyboardType(UIKeyboardType.Default); textfield.setReturnKeyType(UIReturnKeyType.Done); textfield.setAutocapitalizationType(UITextAutocapitalizationType.None); textfield.setAutocorrectionType(UITextAutocorrectionType.No); textfield.setSpellCheckingType(UITextSpellCheckingType.No); textfield.setHidden(true); // Text field needs to have at least one symbol - so we can use backspace textfield.setText("x"); app.getUIViewController().getView().addSubview(textfield); }
((IOSApplication)Gdx.app).getUIViewController().presentViewController(activityShare, true, null);
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); }
public UIViewController(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); } /*</constructors>*/
@Override public void show() { alertWindow.makeKeyAndVisible(); alertWindow.getRootViewController().getView().addSubview(this); Platform.getPlatform().runOnUIThread(() -> { setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(0.5, 0.5))); isShown = true; UIView.animate(0.3, () -> { setAlpha(1); setTransform(CGAffineTransform.Identity()); }); }); }
/** * @since Available in iOS 8.0 and later. */ public static NSObject observeDidEnterBackground(UIViewController object, final VoidBlock1<UIViewController> block) { return NSNotificationCenter.getDefaultCenter().addObserver(ShowDetailTargetDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((UIViewController)a.getObject()); } }); } }
@Method(selector = "initWithCoder:") public UIViewController(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); } /*</constructors>*/
private void createDefaultTextField () { textfield = new UITextField(new CGRect(10, 10, 100, 50)); //Parameters // Setting parameters textfield.setKeyboardType(UIKeyboardType.Default); textfield.setReturnKeyType(UIReturnKeyType.Done); textfield.setAutocapitalizationType(UITextAutocapitalizationType.None); textfield.setAutocorrectionType(UITextAutocorrectionType.No); textfield.setSpellCheckingType(UITextSpellCheckingType.No); textfield.setHidden(true); // Text field needs to have at least one symbol - so we can use backspace textfield.setText("x"); app.getUIViewController().getView().addSubview(textfield); }
/** * @since Available in iOS 8.0 and later. */ public static NSObject observeDidEnterBackground(UIViewController object, final VoidBlock1<UIViewController> block) { return NSNotificationCenter.getDefaultCenter().addObserver(ShowDetailTargetDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((UIViewController)a.getObject()); } }); } }
@Method(selector = "initWithNibName:bundle:") public UIViewController(String nibNameOrNil, NSBundle nibBundleOrNil) { super((SkipInit) null); initObject(init(nibNameOrNil, nibBundleOrNil)); } @Method(selector = "initWithCoder:")
public Rectangle getSafeAreaInsets() { if (Foundation.getMajorSystemVersion() < 11) { return rectangle; } else { UIView view = UIApplication.getSharedApplication().getKeyWindow().getRootViewController().getView(); UIEdgeInsets edgeInsets = view.getSafeAreaInsets(); double top = edgeInsets.getTop() * view.getContentScaleFactor(); double bottom = edgeInsets.getBottom() * view.getContentScaleFactor(); double left = edgeInsets.getLeft() * view.getContentScaleFactor(); double right = edgeInsets.getRight() * view.getContentScaleFactor(); rectangle.set((float) left, (float) bottom, (float) right, (float) top); return rectangle; } }
@Method(selector = "initWithNibName:bundle:") public UIViewController(String nibNameOrNil, NSBundle nibBundleOrNil) { super((SkipInit) null); initObject(init(nibNameOrNil, nibBundleOrNil)); } @Method(selector = "initWithCoder:")
textfield.setText(""); textfield.setSecureTextEntry(false); ((IOSApplication)Gdx.app).getUIViewController().getView().addSubview(textfield); break; case setTextFieldListener:
@Method(selector = "initWithCoder:") public UIViewController(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); } /*</constructors>*/