I have two EditFeilds that need numeric input. The issue is that that zero does not seem to work in any simulator simulating a handset with a hardware keyboard.
Both EditFields are initialized with:
private EditField editField = new EditField( EditField.FILTER_REAL_NUMERIC );
I am I right in assuming that the BB OS should be taking care of the input type. The EditFields need the ability to enter decimal points (but not math operators). I know that the key press on the 0 key is getting caught, since I can print out the key code to the console (but that only works when debugging).
Could this be just a simulator issue?
Mike, I can not reproduce your issue on a range of simulators. What simulator do you use? Do you subclass from EditField or use the EditField class directly?
Related
I'm worked on a custom keyboard and Apple review team rejected it because the keyboard does not support 'Numbers and Decimals' types.
So, I found that the problem is that when a text field requires those specific type of keyboard (for example to inset age, measures, or other numeric values), my keyboard 'misses to respond'.
I understood, reading from Apple documentation, that you must respond to the UIKeyboardTpye property per text object's.
I searched for specific delegate of the UIInputViewController but I wasn't able to find something close to that.
In this forum I found that one good place to examine the current keyboard type required is the textDidChange: delegate, but, it is not called.
I suppose this responder is called when your keyboard, somehow, 'declares' to iOS that it can handle Numbers or Decimal types. In fact I created a simple app with a simple UITextView that requires the Decimal keyboard type:
textView.keyboardType = UIKeyboardTypeDecimalPad;
And I put a NSLog() in the keyboard extension Input View Controller textDidChange: delegate.
As I tap on the text view my delegate is not called, instead the standard Decimal keypad is shown and in the Xcode console I see the following message:
Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using 405786210_Portrait_iPhone-Simple-Pad_Default
I noticed also that this message comes when the UITextView requires the not-allowed keyboard types, i.e. the phonepad. All other keyboard types do not issue that message and the custom keyboard is shown and the textDidChange: delegate is correctly called.
The Numbers and Decimal types are surely allowed and are a MUST for the review team guys. Why the behave as a forbidden-types?
I think we need to 'declare', for example in the info.plist that our extension supports various keyboard types, but... well or more simply... I do not get the point... so... I'm asking... How can I add multiple keyboard types to my keyboard extension??
Thank you very much for help!
After the second rejection of my keyboard extension they sent me a screenshot. I noticed that they, generally, test apps on iPad. This made me think.
After some test it came out that the Numbers and Decimal types do not respond the same way on iPhone and iPad.
On iPhone a text view requiring Numbers or Decimal type keyboard always shows the iOS keypad, i.e. the custom extension is not called.
On the other side, on the iPad a text view requiring Numbers or Decimal type keyboard activates the custom extension.
Finally, after provided a standard numeric keypad (even if my keyboard uses hand-written techniquies) it was approved.
I updated my app from Xcode 7 to Xcode 8 and now I am facing a problem with my password input field.When the password is longer than the provided field, my app freezes and starts to consume memory until it crashes.Fun fact, it just happens when I set the text to "secure text".My field is vertically centered and has a fixed width (not sure if thats imporant), and when my password is longer than the number of characters, the input field can take (and where it should move to the left) I get the crash.
Did anybody experience smt like that?(as I said I just updated to a newer XCode - running on a 10.0.2 real device, didnt have that problem on the old one ...)
Thanks,
Regards
Yes, it is a bug.
Bug is like :
An app can freeze when a user types a large password into a textfield that tries to scale down the text to fit.
Check it : https://openradar.appspot.com/28590124
Possible solution :
change the secure password character in UITextfield
Secure UITextField text change to (*) asterisk character
After updating to Xcode 5.0.2, it seems that iOS simulator custom location option is not working propertly. When I prompt this
And reopen again the custom location dialog
I end getting the lat/lon values without decimals. Also, if I prompt a . instead of a comma, some times the dialog replaces the point with a comma, and sometimes deletes the decimal values. I've tried closing the simulator, changing hardware and restarting Xcode with no results.
There is a bug in the modal "Custom Location" window of iOS Simulator that affects users who have the comma set as the decimal number separator.
If you type the coordinates with the format XX,XX and you press OK, the numbers after the comma are truncated.
Try inputing both coordinates with the format XX.XXX ( 2 digits + a point (.) + 3 digits) then press OK, then quit the iOS Simulator. When you launch it again, it'll have the desired location.
If you go to the same "Custom location" windows you are going to visualize the coordinates in format XX,XX, but DO NOT PRESS OK in that windows, just press Cancel, because if you press OK they will be truncated again.
You can use this Macro #if (TARGET_IPHONE_SIMULATOR) and manually set a custom location in your code.
Hope it helps
It seems that the iOS Simulator is accepting only decimals with dot instead of comma.
For your language (spanish, I think), the Mac OS put comma in decimal numbers. I had the same problem because my Mac OS is in portuguese, that uses the comma as default for decimal numbers.
To change this setting, go to System Preferences > Language & Region > Advanced... and change the Decimal value in the number separators from comma (,) to dot (.) (you can change the currency separators if you want).
Than, every time you open the custom location prompt, decimal numbers of lat/lon values will appear with dot instead of comma.
I hope it has helped you, I couldn't post images because of my poor reputation.
In Xcode,Product -> Scheme -> Edit Scheme... (command + <).
Select Run/Debug from Side Menu, options tab Select "Allow Location Simulation" and select a default location to none. The default location is the reason for custom location changing.
Set your custom Lat/Long to Simulator...
When I write arabic text containing the letter kasra (unicode character 0x650, phonetic equivalent i) to a button, the kasra is not displayed. Thus, the word mumkin appears as mumkn. If I inspect the NSString in Xcode, the kasra is present, but the kasra is not displayed in the iPhone simulator or on a real iPad. The other two short vowels (fatha and damma) are displayed correctly.
The arabic letter kasra (unicode character 0x650) is missing from all of the built-in IOS7 fonts that i have tried.
The solution was to build a different font into my app- I used AGA-Rasheeq-Bold.
This may be a bug. I just tried it in the storyboard editor and it does not seem to work. I created a string in the MAC Notes application, copied and pasted. It displays correctly in the left hand properties panel, but not in the button itself. Could you provide the exact Unicode string? You may need to open a bug report with Apple.
I can confirm that it works correctly in a Label field, but not a Button (IOS 6.1 and Xcode 4.6.3)
Try attributed text. This seems to work around the issue.
I want to add a field to the Phone Screen when a screen is received. I successfully made this using the following code:
public void callIncoming(int callId) {
PhoneScreen ps = new PhoneScreen(Call, UiApplication.getApplication());
PhoneScreenHorizontalManager manager = new PhoneScreenHorizontalManager();
LabelField label = new LabelField("Call Received");
manager.add(label);
ps.add(manager);
ps.setScreenBackground(Color.RED);
ps.sendDataToScreen();
}
I tried this code on the following devices:
BB Mini Curve, Bold 4, Bold 2 and Curve and this works like a charm with all the functionality I want. A background colored red is appearing in the area where I can draw fields
I tried it on these phones and the label field did not appear: Torch, Bold3
On these phones, When I add data to the screen, I guess that these fields are appearing below the ringer off notification. With these devices, no Background is appearing... So this is a main issue.
How to solve this and make the fields appear on these phones too?
Thanks in advance
I don't have the answer, but have started a thread here:
http://supportforums.blackberry.com/t5/Java-Development/PhoneScreenDemo-not-displaying-information-on-os6/m-p/1450769#M184811
I've opened a RIM ticket and will share info as I get it.
As far as I can see PhoneScreen has big issues and is not consistently supported across devices.
Using isSupported() will only determine if the device screen type supports the API, (SVG is required according to RIM Jira ticket), not if it will actually work.