In my application the user needs to enter numbers. On the phone one always needs to press the alt key for numbers. How can I programmatically allow the user to enter numbers in the edit field without pressing the alt key? Please give an example.
try this.
BasicEditField bef = new BasicEditField(BasicEditField.FILTER_NUMERIC);
and if you want to set filter on the fly.
bef.setFilter(TextFilter.get(TextFilter.NUMERIC));
Related
I am trying to create a textfield input, that forces the user to enter a email address but forces the domain (the domain logic is validated when the user enters return), so the user enters a email associated with that domain only. This needs to be very clear on the UI itself, I've tried using the UITextField but since the placeholder is cleared after the user starts editing it doesn't work so well. Here is a sample screenshot of the Slack app that shows similar textfield-
Eg. The user enters team domain, and ".slack.com" is appended to the user text.
Setting up a NSAttributedString as the textField.text from textField:shouldChangeCharactersInRange:replacementString: invocations will give you the desired behaviour.
When the user stars typing you can append the ending domain to what the user types. You can also play with attributed strings changing the color of the appended text so it looks as it's still part of the placeholder. This should be done intextField:shouldChangeCharactersInRange:replacementString:
Check the official documentation https://developer.apple.com/reference/uikit/uitextfielddelegate/1619599-textfield?language=objc
For setting the cursor in the desired position you can use UITextPosition which is extensively explained in this answer
When i enter username using sendkeys in text box as "JOHN" it enters correctly but then removes the last two characters and before going to next textbox it enters only "JO" i have written code in java and using appium.
It could help if you add clicking into the next field before the input itself.
The only thing I don't want is to make users open up the ComposeMail viewcontroller. I just want them to type text into a text field (or multiple text fields), hit a 'submit' button, and somehow, that text be sent to me.
I was thinking that it could be sent as an email without the viewcontroller if I set the email address as some random address like example#gmail.com, or something.
THANKS
I want to make an edit box where an user must enter a password. When they enter the password I want the character not to be displayed, and rather an *. Are there any properties that can be set to do this, I know how to set the TEdit to remain blank while entering but I do not want that. Im using Delphi XE2
I remember from my old days in Delphi that TEdit had a property for that.
Searching on Google, I found this
Namely: "Use the PasswordChar property to create an edit control that displays a special character in place of any entered text."
I have seen that in the TEdit there is a property named PasswordChar. I assigned the * value to it and now the Edit box does not show the characters that is entered into the box
I copy values like name, surname, email and telephone number from the addressbook into Textfields. This works perfectly. but if I click on the name it pushes to the contactdetails and I always have to click on a value. Is it possible that if I open the addressbook, that I only click on the name an, and he atomatically puts the values in to the textfields?
I just ran into this before I saw your question:
http://gauravthummar.wordpress.com/2012/04/19/retrive-all-field-value-from-the-address-book-in-iphoneipad-application/
I hope it can be of some use. If not, perhaps leaving a comment there asking for clarification/help might get you some more answers. The author seems to be on the right track.
Good luck!