Codename One CheckBox with RTL - codenameone

I have set up a simple form with three checkboxes as shown below.
The problem arises when I use right to left with RTL support.
The boxes then cover the texts in a strange way.
I didn't set the alignment I have only changed the color to blue.
When I don't use RTL, checkboxes look fine!!
Also I tested on iPhone device and the same issue happens.
On Android devices, it works fine but it ignores RTL support!!
Please help me out and thanks in advance.

I think there is a regression with the CheckBox and the opposite side mode. Please file an issue on that. The workaround is to disable the opposite side mode either via the theme constant or:
cb.setOppositeSide(false);

Related

react-select dropdown not visible

I'm using react-select to create a dropdown for an open-source application which uses React/Redux and Electron. I'm using the bog-standard example code provided by react-select for this. However, when running, while the select box shows, clicking it seemingly does nothing. The dropdown that's meant to appear does not. When inspecting the HTML sources, it shows that when it's clicked, something does appear in the HTML, but this isn't visible in the app.
This is quite a large application and I don't know how much value there is in posting snippets of code; this one file alone is 500LoC. Does anyone have any ideas why this might be happening though?
The problem was the "overflow" option of the CSS was set to "hidden" by default. Setting this to "visible" in the CSS resolved this and now I the box appears as intended.
If anyone else has a similar issue, pause the application at runtime using the "debugger" command in console and check the CSS stylings of the element in question. I found this by accident but could help for future!

Tips to make Codename One PeerComponents z-ordering working

I created a PeerComponent, that is a port in Codename One of the Horizon Camera SDKs. At the moment, it simply shows a live-preview of the camera.
I tried to add a Label over the PeerComponent: the Label is on top only in Android. On iOS, the Label is on bottom (that means invisible).
I've done a lot of trials to get a correct z-ording on iOS, without success.
My question is which tips, suggestions or checks can I do to make z-ordering working properly on iOS also. Thanks.
Normally it should "just work", there is no special treatment. I think horizon paints in an area we rely on and doesn't paint when we expect it to. Looking at their sample code I see that they reference top and bottom elements which might allow working around this.

How to make the hint text of TextInputLayout vertically center?

Our design team follow the iOS catalog app , the hint text of TextInputLayout is vertically center, but when I try Android it is not. I don't seem to find an option to make it. So why they are different ? Or there's some way to make it?
This is a bug with the implementation of TextInputLayout in the material design library. We have fixed this internally and will be releasing the updated component soon.
As a work around you may be able to set the padding on the child TextInputEditText to adjust it so it is centered.

Codename One - Crash due to TextFields

I had my app working just fine a few days ago and then I noticed the first problem. I had to tap twice in order to make a button go to the next screen. Also happened to the checkBoxes. Had to tap twice to make them change.
But now it got serious. Since yesterday when I tap on a TextField the app freezes and then crashes.
The only significant changes I remember I did were 2: I uploaded an image for the App Icon and I edited the TitleArea UIID. I removed the TOP and BOTTOM margins. It also affected some of my label and button UIID, because now they don't show on the device
When I run the simulator, the doble tap also occurs, but the TextFields work fine and the Button and Label UIID look the way they should.
Any ideas why this happens?
I am right now working with old versions to try to determine the reason, but no luck so far. Thanks
Use a solid color rather than a gradient with the same colors. Gradients are slow and problematic across platforms so you are paying a lot for something that you aren't even using.
We'll need a better test case to reproduce crashing, I think that what you initially saw when you submitted the issue was a regression in the text input that we since resolved in the build servers.

Codename one's VKB not showing in android build

I have installed an android build of codename one on motorola atrix.
Now I have a textfield. WHen I click on the textfield, android's keyboard shows up.
I don't want that. I want to show Codename One's key board(white and transparent). How do i do that?
There is an API called Display.setDefaultVirtualKeyboard() but it probably won't work for Android since we use native input on Android always by default. The keyboard is the smaller issue, the copy/paste and other features available on these OS's are the main reason we chose the native keyboard.
You can file a bug on this and we can evaluate the complexity of adding something like this, but it will probably be a bit of a pain to fix.
Ok, so with Shai's comment given above: this is how i got android to show codename one's keyboard.
Textfield field = new TextField();
VirtualKeyboard vkb = new VirtualKeyboard();
VirtualKeyboard.bindVirtualKeyboard(field, vkb);//binding the vkb to a particular textfield
Display.getInstance().setDefaultVirtualKeyboard(vkb);
Now, the datachange listener for textfield works smooth. Also the hint of the textfield clears out when textfield receives focus.

Resources