org.robovm.apple.uikit.UIView类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中org.robovm.apple.uikit.UIView类的一些代码示例,展示了UIView类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIView类的具体详情如下:
包路径:org.robovm.apple.uikit.UIView
类名称:UIView

UIView介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

  1. private void createDefaultTextField () {
  2. textfield = new UITextField(new CGRect(10, 10, 100, 50));
  3. //Parameters
  4. // Setting parameters
  5. textfield.setKeyboardType(UIKeyboardType.Default);
  6. textfield.setReturnKeyType(UIReturnKeyType.Done);
  7. textfield.setAutocapitalizationType(UITextAutocapitalizationType.None);
  8. textfield.setAutocorrectionType(UITextAutocorrectionType.No);
  9. textfield.setSpellCheckingType(UITextSpellCheckingType.No);
  10. textfield.setHidden(true);
  11. // Text field needs to have at least one symbol - so we can use backspace
  12. textfield.setText("x");
  13. app.getUIViewController().getView().addSubview(textfield);
  14. }

代码示例来源:origin: robovm/robovm

  1. public UIView(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }
  2. /*</constructors>*/

代码示例来源:origin: robovm/robovm-robopods

  1. @Override
  2. public void show() {
  3. alertWindow.makeKeyAndVisible();
  4. alertWindow.getRootViewController().getView().addSubview(this);
  5. Platform.getPlatform().runOnUIThread(() -> {
  6. setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(0.5, 0.5)));
  7. isShown = true;
  8. UIView.animate(0.3, () -> {
  9. setAlpha(1);
  10. setTransform(CGAffineTransform.Identity());
  11. });
  12. });
  13. }

代码示例来源:origin: playn/playn

  1. @Override // from ViewController
  2. public void viewDidAppear(boolean animated) {
  3. super.viewDidAppear(animated);
  4. // plat.log().debug("viewDidAppear(" + animated + ")");
  5. view.bindDrawable();
  6. plat.graphics().viewDidInit(getView().getBounds());
  7. }

代码示例来源:origin: robovm/robovm-robopods

  1. @Override
  2. public void layoutSubviews() {
  3. super.layoutSubviews();
  4. setFrame(parent.getBounds());
  5. CGSize totalSize = new CGSize();
  6. CGRect indicatorF = indicator.getBounds();
  7. indicatorF.getSize().setWidth(Math.min(indicatorF.getSize().getWidth(), maxWidth));
  8. totalSize.setWidth(Math.max(totalSize.getWidth(), indicatorF.getSize().getWidth()));
  9. indicatorF.setX(Math.round((bounds.getSize().getWidth() - indicatorF.getSize().getWidth()) / 2) + xPos);
  10. indicator.setFrame(indicatorF);
  11. yPos += indicatorF.getSize().getHeight();

代码示例来源:origin: Var3D/var3dframe

  1. public Rectangle getSafeAreaInsets() {
  2. if (Foundation.getMajorSystemVersion() < 11) {
  3. return rectangle;
  4. } else {
  5. UIView view = UIApplication.getSharedApplication().getKeyWindow().getRootViewController().getView();
  6. UIEdgeInsets edgeInsets = view.getSafeAreaInsets();
  7. double top = edgeInsets.getTop() * view.getContentScaleFactor();
  8. double bottom = edgeInsets.getBottom() * view.getContentScaleFactor();
  9. double left = edgeInsets.getLeft() * view.getContentScaleFactor();
  10. double right = edgeInsets.getRight() * view.getContentScaleFactor();
  11. rectangle.set((float) left, (float) bottom, (float) right, (float) top);
  12. return rectangle;
  13. }
  14. }

代码示例来源:origin: robovm/robovm-robopods

  1. @Override
  2. public void hide() {
  3. Platform.getPlatform().runOnUIThread(() -> {
  4. if (isShown) {
  5. UIView.animate(0.3, () -> {
  6. setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(1.5, 1.5)));
  7. setAlpha(0.02);
  8. }, (complete) -> {
  9. setAlpha(0);
  10. removeFromSuperview();
  11. alertWindow.setHidden(true);
  12. });
  13. }
  14. });
  15. }

代码示例来源:origin: threerings/playn

  1. @Override // from ViewController
  2. public void didRotate(UIInterfaceOrientation fromOrient) {
  3. super.didRotate(fromOrient);
  4. // platform.log().debug("didRotate(" + fromOrient + "): " + bounds);
  5. platform.graphics().setSize(getView().getBounds());
  6. platform.didRotate(fromOrient);
  7. }

代码示例来源:origin: robovm/robovm

  1. public UIView(@ByVal CGRect frame) { super((SkipInit) null); initObject(init(frame)); }
  2. public UIView(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }

代码示例来源:origin: libgdx/libgdx

  1. private void createDefaultTextField () {
  2. textfield = new UITextField(new CGRect(10, 10, 100, 50));
  3. //Parameters
  4. // Setting parameters
  5. textfield.setKeyboardType(UIKeyboardType.Default);
  6. textfield.setReturnKeyType(UIReturnKeyType.Done);
  7. textfield.setAutocapitalizationType(UITextAutocapitalizationType.None);
  8. textfield.setAutocorrectionType(UITextAutocorrectionType.No);
  9. textfield.setSpellCheckingType(UITextSpellCheckingType.No);
  10. textfield.setHidden(true);
  11. // Text field needs to have at least one symbol - so we can use backspace
  12. textfield.setText("x");
  13. app.getUIViewController().getView().addSubview(textfield);
  14. }

代码示例来源:origin: playn/playn

  1. @Override // from ViewController
  2. public void didRotate(UIInterfaceOrientation fromOrient) {
  3. super.didRotate(fromOrient);
  4. // plat.log().debug("didRotate(" + fromOrient + "): " + bounds);
  5. plat.graphics().boundsChanged(getView().getBounds());
  6. plat.orient.emit(new RoboOrientEvent.DidRotate(fromOrient));
  7. }

代码示例来源:origin: com.mobidevelop.robovm/robovm-cocoatouch

  1. @Method(selector = "initWithCoder:")
  2. public UIView(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }
  3. /*</constructors>*/

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-robovm

  1. private void createDefaultTextField () {
  2. textfield = new UITextField(new CGRect(10, 10, 100, 50));
  3. //Parameters
  4. // Setting parameters
  5. textfield.setKeyboardType(UIKeyboardType.Default);
  6. textfield.setReturnKeyType(UIReturnKeyType.Done);
  7. textfield.setAutocapitalizationType(UITextAutocapitalizationType.None);
  8. textfield.setAutocorrectionType(UITextAutocorrectionType.No);
  9. textfield.setSpellCheckingType(UITextSpellCheckingType.No);
  10. textfield.setHidden(true);
  11. // Text field needs to have at least one symbol - so we can use backspace
  12. textfield.setText("x");
  13. app.getUIViewController().getView().addSubview(textfield);
  14. }

代码示例来源:origin: threerings/playn

  1. @Override // from ViewController
  2. public void viewDidAppear(boolean animated) {
  3. super.viewDidAppear(animated);
  4. // platform.log().debug("viewDidAppear(" + animated + "): " + bounds);
  5. EAGLContext.setCurrentContext(view.getContext());
  6. platform.graphics().ctx.viewDidAppear();
  7. platform.graphics().setSize(getView().getBounds());
  8. }

代码示例来源:origin: com.gluonhq/robovm-cocoatouch

  1. @Method(selector = "initWithCoder:")
  2. public UIView(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }
  3. /*</constructors>*/

代码示例来源:origin: Var3D/var3dframe

  1. textfield.setText("");
  2. textfield.setSecureTextEntry(false);
  3. ((IOSApplication)Gdx.app).getUIViewController().getView().addSubview(textfield);
  4. break;
  5. case setTextFieldListener:

代码示例来源:origin: com.mobidevelop.robovm/robovm-cocoatouch

  1. @Method(selector = "initWithFrame:")
  2. public UIView(@ByVal CGRect frame) { super((SkipInit) null); initObject(init(frame)); }
  3. @Method(selector = "initWithCoder:")

代码示例来源:origin: com.gluonhq/robovm-cocoatouch

  1. @Method(selector = "initWithFrame:")
  2. public UIView(@ByVal CGRect frame) { super((SkipInit) null); initObject(init(frame)); }
  3. @Method(selector = "initWithCoder:")

相关文章