When putting i.e. a
TextField textField = new TextField("π½πΆπΆ");
on a form it works perfect on Android but on iOS it gets garbled.
To reproduce:
show the form -> textfield looks it correct
focus it for edit on it by clicking
change nothing, just select done / loose focus
focus it again for edit on it by clicking
The result are strange symbols.
textField.getText().getBytes() - on iOS gives the bytes: -16,-97,-105,-67, ... before the edit (the same sequence as on Android or in the simulator), but -17,-105,-67,-17, ... after ending "edit" (without editing).
It seems that a 4 byte code -16,-97,-114,-74 for the πΆ gets a 3 byte code -17,-114,-74 after editing.
I would strongly suggest avoiding emoji's in the code itself. This is an issue with our implementation of the iOS UTF-8 parser that was resolved recently: https://github.com/codenameone/CodenameOne/issues/2365
However, it didn't make it into the 4.0 release so this should work within a couple of weeks when we resume the weekly updates.
Related
I'm using react-big-calendar (in my next.js project) and as you can see in the image above I'm displaying events on it and I have a bug that I can't understand why its happening.
When I press on the +3 more (which shows me all the events happening on the given day) then the dropdown menu that you can see on the top right image opens and then instantly closes and even if I change page it still gives me the same bug and it happens to all the dropdowns that I have on the website I'm working on.
Now one "hack" is to make the min height of the calendar bigger (I can make it 900px instead of the current 700px) so that all 4 events are shown directly instead of showing the +3 more but the problem with this "hack" is that imagine I have A LOT of events on a given day then I would need to set the min height to really really big number which is undesirable.
Note that the bug disappear if I reload the page but obviously I just can't force the user to reload every time he wants to see more events on a given day.
Which version of React-Big-Calendar are you using? Older versions of RBC used an anchor tag, for the 'more', that had an href="#". I could see that causing issues like this. Current version has replaced this code with a 'button' component styled to look like an anchor.
So, I am making a note taking app with react, and I want to make something that works like apple notes where you can click on the checkbox and it adds a new checkbox to the writing area.It keeps adding a new one when you press return/enter until you press backspace, and then you can resume typing regular text. I've been trying to do it yesterday pretty much the whole day, I found some rich editor text libraries but even though they have functionality to style the text e.g bold, italic etc. I cannot find a library that provides this specific functionality. I tried using a div with the contentEditable attribute instead of textarea but I wasn't sure what to do.
In case my explanation was bad here is an image.
How can I prevent the showing of the Next or Done buttons of the Android VKB in a Codename One app?
Currently, for my app, they are a mess: the next button of the VKB doesn't focus the next field, but the previous. After tons of trials, I didn't find a way to make them working correctly (but there are fine on iOS and on the Simulator). I also tried to override the Layout.overridesTabIndices(com.codename1.ui.Container) and Layout.getChildrenInTraversalOrder(com.codename1.ui.Container) methods in the Form, but nothing changed on Android.
I supposed two possible causes: the use of a Form inside a Form or, more probably, the fact that I replace all the TextFields and Pickers in the same Form (and other components). Maybe the fact that the inner Form is deeply changed results in a confusion for the Android mapping of the "next" button.
That's why my request: because I didn't find a way to make the "next" button useful, I'm asking how I can avoid that it's been shown.
Thank you
Nesting forms would probably mess with the focus traversal/tab order.
Normally you should be able to override public TabIterator getTabIterator(Component start) to return a blank iterator. I'd suggest doing the same for both the parent and child form to disable the "next" feature.
In a test-class, is there any way to invoke Buttons inside the toolbar, without a name (""), which were added like this?
getToolbar().addMaterialCommandToRightBar("", FontImage.MATERIAL_PICTURE_AS_PDF, e -> createPDF());
Or can I somehow tell the test-class to show a specific form ?(which is happening when I click the button without a label).
The test recorder is not generating any code in that case. It seems that it is only working with buttons, which have a non-empty String as name, as they are simply invoked by
clickButtonByLabel("Label");
The test recorder was written before the Toolbar existed, we tried to update it for the Toolbar recently but this proved to be pretty difficult.
We have this issue that covers this bug. As a workaround you can post the command directly in the code of the test.
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)