I have a UIAlertView
UIAlertViewStylePlainTextInput
that I'm using to add things to a TableView. Nothing crazy, it's just a list of things the user can add to. It would look nicer with the first letters capitalized. I don't want to automatically capitalize whats in the text field. I just want the keyboard to pop up with the shift key highlighted. I tried switching the keyboard to UIKeyboardTypeNamePhonePad. But that didn't work. I also noticed in the app store on my Iphone, they use the same UIAlertView and there is no shift highlighted. So maybe it's not possible to do this?
Err. Sorry, I didn't know you had to do it through the textfield, I thought it was some sort of keyboard option.
[alert textFieldAtIndex:0].keyboardAppearance = UIKeyboardAppearanceAlert;
[alert textFieldAtIndex:0].autocapitalizationType = UITextAutocapitalizationTypeWords;
Related
I have a popup modal and I use nvda but it starts read from the interaction element and doesnt read the title, and I want it to start from the title that above also. Btw I don't have x button.
How can I solve it? Is it setting?
Check out the dialog design pattern and the associated example. The example sounds like exactly what you want. There's a title on the dialog and it's announced but the focus moves to the first input field.
You didn't post any code so perhaps you're missing the aria-labelledby on your dialog that should point to the dialog heading.
I would like to edit a numeric decimal value like 21.7 and enable the user to close the numeric keyboard (iOS 13.3.1, iPhone Xr) when done.
I'm using a numeric text field (TextField with constraint TextArea.DECIMAL). I've NOT set the option putClientProperty("iosHideToolbar", Boolean.TURE) for the TextField. However, there is no keyboard Done option, so the user cannot close the keyboard after entering the value.
I've gone through the documentation (https://www.codenameone.com/manual/components.html) and as I understood it, using tf.putClientProperty("iosHideToolbar", Boolean.TRUE); would hide the toolbar, so since I'm NOT setting the property, I assume the toolbar and the Done button should be available.
Any advice on how to get the Done button (or other ways to getting rid of the numeric keyboard)?
In the action listener for the text field you can just invoke stopEditing() on the text field. You can use either the standard action listener or the done listener for this purpose.
I would like to edit a numeric decimal value like 21.7 and enable the
user to close the numeric keyboard (iOS 13.3.1, iPhone Xr) when done.
I'm using a numeric text field (TextField with constraint
TextArea.DECIMAL). I've NOT set the option
putClientProperty("iosHideToolbar", Boolean.TURE) for the TextField.
However, there is no keyboard Done option, so the user cannot close
the keyboard after entering the value.
Are you sure?
I tried the following code on iOS 13 (iPhone X):
Form hi = new Form("Example", BoxLayout.y());
hi.add("Enter a decimal value:");
TextField textField = new TextField();
textField.setConstraint(TextArea.DECIMAL);
hi.add(textField);
hi.add(new Button("Submit"));
hi.show();
Result:
As you can see, this sample code produces the "Done" button on iOS. So, if your app doesn't show it, maybe the cause of the issue is elsewhere.
I just noticed that there is no Done button shown for a multi-line
TextField with normal text
I tried:
Form hi = new Form("Example", BoxLayout.y());
hi.add("Enter a multiline text:");
TextArea textField = new TextArea("", 3, 80);
textField.setConstraint(TextArea.ANY);
hi.add(textField);
hi.add(new Button("Submit"));
hi.show();
Result:
Also in this case, there is the "Done" button.
Currently, as far as I know, the "Done" button is not shown in the iOS virtual keyboard toolbar if it's already included in the keyboard itself, for example in the case of a generic TextField without a "next" TextField. I mean like in the following screenshot (note that the blue key "fine" is the Italian equivalent of "Done"):
So, I don't know how to help you. Try to update your question (or try to open a new one) adding a self-enclosed test case that reproduces your issue.
I am a novice programmer working on a project that has buttons change color when pressed (among other things). I am having a problem that the first button I click shrinks (the padding increases?) when it is clicked, but it still works and does everything it is supposed to. I have tried looking through theme.res to find a way to stop the button from shrinking when pressed and I have tried looking for an answer online, but have not found a solution. Thanks!
In the Resource Editor(theme.res), go to "Themes" -> "Unselected" tab. Right click over the style you use for the button and press Derive All.
I need a search field component but i don't find such a component or a imeoption for text field to make it as search field. i search a lot but still nothing founded.
is there any way to do that?
Thanks in advance.
What do you mean by "search field"?
There is a DataChangeListener that allows you to track fine grained changes to the TextField. You can set a hint & hint icon to show that this is a search field. Its unclear what you are missing.
Edit based on comments:
To get the magnifying glass icon instead of Done button on Android you can use the somewhat undocumented flag:
textCmp.putClientProperty("searchField", Boolean.TRUE);
This is a done event, so you can distinguish pressing this from pressing outside of the field by using the done listener callback on the text component.
I have set-up in a storyboard a view that contents two textfields: one with secure option turn on and an other without.
I have set-up the content of those textfields in the viewDidLoad method of the associated viewController. If I select the textField with secure note turned on then select the other one and click the backspace all its content of this latter gets clear out. It is not happening if I select directly the textfield with no secure option the first time.
Does anyone have a clue of this behaviour?
It looks like this is a bug that appeared on iOS6 and related to changes introduce with UITextField where other people have also observed changes in behavior between iOS5 and iOS6; see this post: (Backspace functionality in iOS 6 & iOS 5 for UITextfield with 'secure' attribute)