This issue has been elusive to detect.  See comment here
https://github.com/codenameone/CodenameOne/issues/2317#issuecomment-365372296

It is scheduled for 5.0 unless some major breakthrough occurs.

You can workaround it in the meantime by adding the following to your text
field:
textField.putClientProperty("android.cursorVisible", Boolean.FALSE)

This disables the blinking cursor in the field, which strangely fixes the
issue of disappearing text in some (not all) older versions of android.

Steve

On Sun, Feb 25, 2018 at 9:38 PM, Nicola Dell'Amico <
[email protected]> wrote:

>
> Further ,
> I tried with:
>         TextField.setUseNativeTextInput(false);
> Now only the new edited text disappears and the TextField only shows the
> original text.
> From TextField src code code I found:
>     public void paint(Graphics g) {
>
>         //the native input will show the string.
>         if(useNativeTextInput && Display.getInstance().isNative
> EditorVisible(this)) {
>             return;
>         }
>
>         UIManager manager = getUIManager();
>         manager.getLookAndFeel().drawTextField(g, this);
>
>         if (drawCursor && hasFocus() && isEditable()) {
>             manager.getLookAndFeel().drawTextFieldCursor(g, this);
>         }
>
>         paintHint(g);
>     }
>
>
> Whats' wrong ?
>
>
> On Monday, February 26, 2018 at 6:17:48 AM UTC+1, Nicola Dell'Amico wrote:
>>
>> Hi, I'm developing an application for Android 4.1.1 on Linux with
>> Netbeans and CodeNameOne plugin rev.3.8.0 and still having that issue
>> (working fine on latest android OS , but I have tio run the on rugggerized
>> industrial device and have no optiont to upgrade the OS).
>> Wasn't it fixed ?
>> I tried anything but no luck.
>>
>> Please help !!!!!!
>>
>>
>> On Wednesday, March 2, 2016 at 4:48:55 PM UTC+1, Steve Hannah wrote:
>>>
>>> Thanks.  This was a regression from some recent changes.  It is fixed
>>> now in Git and should be on the server soon.
>>> https://github.com/codenameone/CodenameOne/commit/5c010b7995
>>> 65ed93e920db6bd81ad4a7d7cd1f6a
>>>
>>> Steve
>>>
>>> On Wed, Mar 2, 2016 at 5:27 AM, Gareth Murfin <[email protected]>
>>> wrote:
>>>
>>>> Whoops that was confusing, steps to recreate, make a textfield, run
>>>> app, tap textfield, type some text, keep the keyboard visible and tap
>>>> somewhere else on your form other than the textfield. Observe text vanishes
>>>> from textfield, this does not happen in standard android.
>>>>
>>>> On Wednesday, March 2, 2016 at 9:24:59 PM UTC+8, Gareth Murfin wrote:
>>>>>
>>>>> My client just noticed that when the textfields in our app are not in
>>>>> focus and the user taps outside of the keyboard *while* it is showing
>>>>> (on Android) the text vanishes completely, I looked at the unselected 
>>>>> state
>>>>> and it should have a proper text colour, the text is not even white or
>>>>> black it is simply gone, almost as if it is not painting in that
>>>>> circumstance, anyone else noticed this?
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "CodenameOne Discussions" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> Visit this group at https://groups.google.com/grou
>>>> p/codenameone-discussions.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/codenameone-discussions/79f99775-d2a4-4257-bcbf-656d69b6
>>>> 26f7%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/codenameone-discussions/79f99775-d2a4-4257-bcbf-656d69b626f7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Steve Hannah
>>> Software Developer
>>> Codename One
>>> http://www.codenameone.com
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "CodenameOne Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/
> group/codenameone-discussions.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/codenameone-discussions/cbddd504-7499-483b-9ac2-
> b40e638142bb%40googlegroups.com
> <https://groups.google.com/d/msgid/codenameone-discussions/cbddd504-7499-483b-9ac2-b40e638142bb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Steve Hannah
Software Developer
Codename One
http://www.codenameone.com

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKUo%2Bph6W-Bn7qNerXRovvOVzbcnjr%2BqFZWhk9dYw%3DeoJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to