(Codenameone) Blackberry TextField Missing Border When Focusing - lwuit

I want to ask why the border of TextField in Blackberry (CodenameOne) always missing when focusing? I am using Native Themes and I have try with theme builder to change the attribute (TextField Background, border etc..) but still missing, does anyone know how to make border on the TextField still appear when you type something in the TextField? Thanks for your help
PS: This does not happen on LWUIT Thorsten Blackberry 1.4

If I recall correctly Thorsten's port doesn't use in place editing for input.
During input the native text field border is used, there is very limited control on the native input.

I have used LWUIT for some years in BlackBerry and yesterday I was facing the same problem. What I did:
Make my own version 1.5 using the things related to TextField and focus from 1.4 (BlackBerryTouchImplementation.java and BlackBerryTouchSupport.java and some little changes).
I did it because I found 2 problems more:
1.The textField were ignoring addDataChangeListener.
2.With constraints PASSWORD | NUMERIC in a TextField, the cursor doesnt move from the first place, I mean, you can enter 8 digit (qwer1234 because it's ignoring the constraints, input mode, input mode order) and the cursor is in the left side of "q".
I know that Shai Almog probably dont like it but let me tell you that I have made test on these BlackBerry devices: 9330, 9550, 9700 and all is ok.
I have been developing a big one app for around 4 months for Spanish language and the quality team have not found big problems.

Related

Unity - Displaying Burmese (Zwagyi) text

We're currently developing a game in Unity (2019.4.28f1). This game is played internationally. We'd like to add support for languages other than common Latin written languages. Currently, we're trying to implement support for Burmese, but aren't making much progress.
Finding fonts to display Burmese isn't a big issue. As you can see in the image below, we manage to display all characters that are supposed to be displayed.
However, the big problem here is that the displayed order of symbols isn't the same as what it's supposed to be (see image below for the desired result).
We've tried several fonts that use either Unicode or Zwagyi encoding, but none of them seem to display characters in the correct order. Currently, we're using a padauk font from here, which is supposedly Unicode encoded. Then, within Unity, we applied to following settings to that font:
So, if one of you knows more about this and can share some information with me, that would be much appreciated!
Thanks.
We've already found a solution for this! Before setting the text of the text component convert the Unicode codes to Zwagyi and it'll display the text in the correct order!
All the credits go to this guy who put in the effort to make a tool for these use cases!
Of course, you still need a (Unicode) font that supports these (Burmese) symbols.
Example:
Text textComponent = GetComponent<Text>();
textComponent.text = mmfont.Net.Converter.Uni2ZG(yourUnicodeText);

Unity WebGL Mobile browser workaround and keyboard input fix?

Hey everyone so I read that unity doesn't really support mobile browsers for WebGL games. im using 2020.1.4.And sure enough, the game gets a bit distorted by not being scaled properly. it's like the camera is bigger so it shows on the screen that blue color. I tried some things, setting width and height to auto or removing config.devicePixelRatio = 1; as suggested by a friend but nope! still looks horrible! And if that wasn't enough the keyboard doesn't show up when clicking on form fields. i tried this one
https://github.com/eforerog/keyboardMobileWebGLUnity
which displayed an error when pressed on and this one
https://github.com/dantasulisses/WebMobileInputFix which just didn't even compile!
Any ideas, please?
I did my research and tried every plugin I could find. I used Unity 2020.3.28f1 and tested both on Android-phone and iPhone.Here is my report.
These plugins don't work:
https://unitylist.com/p/f58/Unity-webgl-inputfield
https://github.com/eforerog/keyboardMobileWebGLUnity
https://github.com/dantasulisses/WebMobileInputFix
This plugin works, but you should use different settings for IOS and Android on same input field game object. If you use "prompt", it works for IOS only, and "overlay" works for Android only. Look for documentation in page:
https://github.com/unity3d-jp/WebGLNativeInputField
And this plugin works best at the moment. Yes, it is a bit ugly though, but it works.
https://github.com/kou-yeung/WebGLInput
And there is a fix for Unity 2021 for it:
https://github.com/kou-yeung/WebGLInput/releases/tag/1.0
There's a keyboard that overlays, when using it you just need to tap the notification to access it and then click the "back" button to hide it https://play.google.com/store/apps/details?id=com.fishstix.gameboard
I made this project that simply recreates a keyboard using buttons in unity.
I implemented it in a WebGL build successfully.
https://github.com/thetimeste/WebGL-Build-Keyboard-Unity.git
I would recommend using the native js window.prompt() fields as of writing. They have great cross-platform support, allow for extra features like special characters, emojis, copy and paste etc. and are pretty easy to set up. Once (or honestly if ever) Unity adds their own reliable implementation you can easily remove this lightweight implementation.
Create a .jslib file that has a function opening a window.prompt(description, currentText)
Return the result at the end of that function back to a unity object with a recipient script
Make a derivation from Unity's event system overwriting the OnApplicationFocus(bool focus) function (leaving it empty), to fix a sneaky Chrome Android bug.
That's it. The result should look something like in this demo: https://pop.demo.neoludic.games
If you want to save some development time on a feature that really should just be native in Unity, you can also check out my plugin based on the method above. https://neoludic-games.itch.io/pop-input
I also need to enable mobile virtual keyboard for running webgl on mobile device.
I've tried the code from your mentioned url. It gives you some idea on how to do
it, but the code are totally buggy and unusable. Now I am trying to implement it
by myself.

autocorrectType is not working on iOS 13 using swift

I know this is quiet simple and straight forward to disable autocorrection on iPhone and it worlds pretty much fine, but until now. Surprisingly, suggestion bar appear for text field even I have disabled it from storyboard and even programmatically.
self.textField.autocorrectionType = .no
Done that in sotoryboard as well.
But it does appear on iOS 13, not on previous versions and simulator.
There are many answers already for this one but none is working on iOS 13 so no need to mark the question as duplicate.
Cheers!
If you are using a Storyboard you can disable autocorrection on the attributes inspector (the down arrow icon) under the Text input traits. See the image below for details.

Default to numbers view on textfield focus

I am trying to make a UITextField default to the numbers view of the keyboard on focus, the same as e.g. the "Zip" field in the iPhones contacts/addressbook app. I know the KEYBOARD_* constants of the Ti.UI module, none of those seem to do the trick though, as I do not want to disallow alpha characters
I just want the numbers to be auto focused.
The field will be to describe a value, which in most cases will be a monetary value, and therefore a number, but in some cases it may be something like "2 pieces".
I am working with Titanium SDK 2, iOS 5.1, iOS Simulator on OS X 10.7.
Thanks for any help!
here it is
UIKeyboardTypeNumberPad
read here more about it
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html#//apple_ref/doc/c_ref/UIKeyboardType
It's actually the Keyboard UIKeyboardTypeNumbersAndPunctuation. The reason it wasn't working was that I wrote keyBoardType instead of keyboardType. My bad.

Cannot type using non-QWERTY keyboards on iOS

My iPhone app can't seem to use soft keyboards that doesn't use the US-like QWERTY layout. That is when I set the keyboard to French or Germany, even text fields cannot take in text and an error message No input manager class for input mode error is shown in the console (when debugged under Xcode). Switching to the Emoji keyboard also shows the same problem. But the problem doesn't occur on QWERTY keyboard layouts, like Dutch and Indonesian keyboards.
The all cases are consistent and reproducible both the device (iPhone 4) and the iPhone simulator.
These are error messages in the Xcode's debugger console
When the keyboard is set to French:
No input manager class for input mode: fr_FR
When the keyboard is set to Germany:
No input manager class for input mode: de_DE
When the keyboard is set to Emoji:
No input manager class for input mode: emoji
My app's deployment target is iOS 3.1.3 (I'm still supporting 1st gen devices) but the development environment is Xcode 4.3.1 and iOS 5.1 Simulator. (I don't know whether this is relevant but just in case).
Anybody can help how to fix this?
Thanks in advance.
In my case, this was caused by my swizzling -[NSBundle infoDictionary] and returning a copy of the original dictionary.
I did this to be able to change info dictionary values at runtime (specifically, providing a non-shortened bundle display name to replace the shortened value used on the home screen).
The fix was to not return a copy of the info dictionary, but with some more reflection magic handle each key obtained from the dictionary:
https://github.com/Lyndir/Pearl/blob/master/Pearl/NSBundle%2BPearlMutableInfo.m
Not sure if this answer will help you but I found it from this link: http://code.google.com/p/networkpx/wiki/Creating_Keyboard_Bundles
Anyway here is what I am talking about:
Like UIKeyboardLayoutClass, this field also can be referred using the
same "=xxx" syntax. You can also write the class name of your own
input manager class here.
If this field is missing, no input managers will be used.
Hopefully this will help you!