org.robovm.apple.uikit.UITextField.getText()方法的使用及代码示例

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

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

UITextField.getText介绍

暂无

代码示例

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

@Override
public void clicked (UIAlertView view, long clicked) {
  if (clicked == 0) {
    // user clicked "Cancel" button
    listener.canceled();
  } else if (clicked == 1) {
    // user clicked "Ok" button
    UITextField textField = view.getTextField(0);
    listener.input(textField.getText());
  }
  delegate = null;
}

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

@Override
public void clicked (UIAlertView view, long clicked) {
  if (clicked == 0) {
    // user clicked "Cancel" button
    listener.canceled();
  } else if (clicked == 1) {
    // user clicked "Ok" button
    UITextField textField = view.getTextField(0);
    listener.input(textField.getText());
  }
  delegate = null;
}

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

@Override
  public String getTextInput() {
    return inputTextField.getText();
  }
}

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

public void clicked(UIAlertView view, long buttonIndex) {
  // Cancel is at button index 0
  result.succeed(buttonIndex == 0 ? null : field.getText());
 }
});

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

public void clicked(UIAlertView view, long buttonIndex) {
  // Cancel is at button index 0
  platform.notifySuccess(callback, buttonIndex == 0 ? null : field.getText());
 }
});

代码示例来源:origin: TomGrill/gdx-dialogs

@Override
  public boolean shouldChangeCharacters(UITextField textField, @ByVal NSRange nsRange, String additionalText) {
    if (textField.getText().length() + additionalText.length() > maxLength) {
      String oldText = textField.getText();
      String newText = oldText + additionalText;
      textField.setText(newText.substring(0, maxLength));
      return false;
    }
    return true;
  }
});

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

@Override
public void clicked (UIAlertView view, long clicked) {
  if (clicked == 0) {
    // user clicked "Cancel" button
    listener.canceled();
  } else if (clicked == 1) {
    // user clicked "Ok" button
    UITextField textField = view.getTextField(0);
    listener.input(textField.getText());
  }
  delegate = null;
}

代码示例来源:origin: TomGrill/gdx-dialogs

@Override
public void didDismiss(UIAlertView alertView, long buttonIndex) {
  if (listener != null) {
    if (buttonIndex == 0) {
      Gdx.app.postRunnable(new Runnable() {
        @Override
        public void run() {
          listener.cancel();
        }
      });
    }
    if (buttonIndex == 1) {
      UITextField textField = alertView.getTextField(0);
      final String result = textField.getText();
      Gdx.app.postRunnable(new Runnable() {
        @Override
        public void run() {
          listener.confirm(result);
        }
      });
    }
  }
}

相关文章