I have a javafx application to be deployed in android, I have a textfield in it, but instead of showing the default keyboard(letters,numbers,symbols), I just want to display numeric keypad. How to do it?
If you have a TextField, you can call:
text.getProperties().put("vkType", "numeric");
Note that you need to use -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.virtualKeyboard=javafx to make it work.
Related
Rocket for Mac has a Preferences Window in which it has a form like below to insert & remove an app.
I want to make a form like that but how should I build it? I am new to Cocoa development so this might be obvious.
I want to make the one with the label Disable Rocket within these apps:
I found a solution.
What I did was use NSTableView with single column for the textbox. And made the NSTextField in it to be text editable using the Behaviour attribute.
Then for the + & - button I used 2 NSPopupButton & made the Image attribute to be NSAddTemplate & NSRemoveTemplate which exists by default in Xcode. There are bunch of other images that are default in it.
That solved it for me :)
when we click the text field, the default keyboard or keypad not to be appear instead i need to display the custom keyboard..
Did any one know the answer please post it..
Declared in
UIResponder.h
UIInputViewAudioFeedback protocol.
Is this method correct or else there having any simple method to work out?
You need to create a protocol for this for having a custom keypad appearing throughout the app. I have made it few months back and the stuff was working well. My requirement was to create a keyboard for farsi language, because ios does not have farsi in its language settings.
There is no need to make protocol if you want it in just 1 viewcontroller.
Here is my that thread:
customized keypad on the iPhone Application
Here's something that I created that might help. Just fork it on GitHub and change the Punjabi characters to Myanmar. Most of the hard work is done for you :)
https://github.com/kulpreetchilana/Custom-iOS-Keyboards
Per your comment you need the Number Pad keyboard.
Set your UITextField keyboardType property, either via Interface Builder or programmatically:
textfield.keyboardType = UIKeyboardTypeNumberPad;
I am writing an application using Objective-C for iPhone.
In this application, the user, while entering a new record, needs to have a lookup capability (such as state, gender, phone type, etc). In C# i usually use a drop down combo or something like that to accomplish this task. What is the equivalent in Objective-C? Can someone show me a sample application?
Take a look at UIPickerView. It uses a spinning wheel to show a set of values that can be selected by the user. You need to create an object that adopts the UIPickerViewDelegate protocol to handle responding to what the user selects, and an object that adopts UIPickerViewDataSource protocol to populate the picker view.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPickerView_Class/Reference/UIPickerView.html
The equivalent would be a UIPickerView
If you want to choose a date then use UIDatePicker.
UIPickerView is pretty much the same thing as a dropdown combo box, except without the dropdown part
I prefer to use UIActionSheet. Works quite well as combo box.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIActionSheet_Class/Reference/Reference.html
there is an iOS combobox api that might help you add a combobox component to your app. Check it here: http://www.chupamobile.com/products/details/365/ZComboBox/
I'm making a webapp, and I'd like an input field to show the Iphone's number keypad.
I understand that type=number will make the keypad show the way I'd like.
The trouble is that type=number does not support placeholder text. So if I would like this:
Expiration Date:
[eg: 2010]
I can not get it to work, and also show the right keyboard.
Is there a way to force the iPhone keyboard into number mode without using the number input type?
Placeholder seems to work (in both Safari on my Mac as Mobile Safari on my iPhone; compatibility list).
<input type="number" placeholder="2010">
http://jsfiddle.net/XPL48/
Otherwise, use JavaScript to create a placeholder, e.g. this jQuery plugin: http://plugins.jquery.com/project/placeholder.
I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values varies. The problem is that the number pad does not contain a key for entering a decimal point.
When I lock my phone, the number pad that comes up to enter a passcode has a custom button to make an emergency call (as seen in the following screenshot):
Numberpad with custom button http://img25.imageshack.us/img25/6426/photoejg.jpg
Does anyone know how to create a number pad with a decimal point button or a custom button (like the emergency call button above)?
Thanks.
There's no Apple-approved way to edit the existing keyboard. If you want them to allow it, file a feature request.
That said, it just so happens that in most applications the keyboard (instance of UIKeyboard) is a separate UIWindow, and you can iterate over the windows in the application and start adding custom subviews that respond to the appropriate touch actions. Find it by iterating over [[UIApplication sharedApplication] windows] and checking to see if the description contains the string UIKeyboard. For more info on this method and some sample code, see this answer.
Another approach is to create your own custom view and build a keyboard from scratch. Be careful if you do this, though, as it requires a lot of manual work, not only in creating the keyboard and getting the touch behavior to match Apple's, but also in any control you add that would bring up the regular keyboard - you'll need to redirect things like becomeFirstResponder to show your own keyboard, rather than Apple's.
Edit: As ZaBlanc pointed out, newer versions of iOS have a way to do this with the inputView and inputAccessoryView properties. See the UIResponder class reference for details.
set UIKeyboardType to UIKeyboardTypeDecimalPad
Available in iOS 4.1 and later.
Create a UIViewController that contains a UIView with a bunch of buttons. Now your keyboard can have whatever you want on it.