Package org.robovm.cocoatouch.uikit

Examples of org.robovm.cocoatouch.uikit.UITextField


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

      @Override
      public void cancel (UIAlertView view) {
        listener.canceled();
        delegate = null;
      }
    };

    // build the view
    final UIAlertView uiAlertView = new UIAlertView();
    uiAlertView.setTitle(title);
    uiAlertView.addButton("Cancel");
    uiAlertView.addButton("Ok");
    uiAlertView.setAlertViewStyle(UIAlertViewStyle.PlainTextInput);
    uiAlertView.setDelegate(delegate);

    UITextField textField = uiAlertView.getTextField(0);
    textField.setPlaceholder(placeholder);
    textField.setText(text);

    return uiAlertView;
  }
View Full Code Here

TOP

Related Classes of org.robovm.cocoatouch.uikit.UITextField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.