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

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

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

UIView介绍

暂无

代码示例

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

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);
}

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

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

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

@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());
    });
  });
}

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

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

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

@Override
public void layoutSubviews() {
  super.layoutSubviews();
    setFrame(parent.getBounds());
  CGSize totalSize = new CGSize();
  CGRect indicatorF = indicator.getBounds();
  indicatorF.getSize().setWidth(Math.min(indicatorF.getSize().getWidth(), maxWidth));
  totalSize.setWidth(Math.max(totalSize.getWidth(), indicatorF.getSize().getWidth()));
  indicatorF.setX(Math.round((bounds.getSize().getWidth() - indicatorF.getSize().getWidth()) / 2) + xPos);
  indicator.setFrame(indicatorF);
  yPos += indicatorF.getSize().getHeight();

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

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;
  }
}

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

@Override
public void hide() {
  Platform.getPlatform().runOnUIThread(() -> {
    if (isShown) {
      UIView.animate(0.3, () -> {
        setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(1.5, 1.5)));
        setAlpha(0.02);
      }, (complete) -> {
        setAlpha(0);
        removeFromSuperview();
        alertWindow.setHidden(true);
      });
    }
  });
}

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

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

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

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

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

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);
}

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

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

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

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

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

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);
}

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

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

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

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

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

textfield.setText("");
  textfield.setSecureTextEntry(false);
  ((IOSApplication)Gdx.app).getUIViewController().getView().addSubview(textfield);
  break;
case setTextFieldListener:

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

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

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

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

相关文章