Highlighted

How do I stop predictive text in username text input field?

New Here ,
Jun 17, 2014

Copy link to clipboard

Copied

In Android devices, predictive text is making impossible for users to log on. When predictive text is turned off, the username text input works fine. When predictive text is turned on, the device adds text as you type in the username. Is there anyway to stop this? The only way to stop this right now is to enable the display as password option for the text input. But that is weird, so I would like to know if someone has another suggestion.

TOPICS
Performance issues

Views

899

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How do I stop predictive text in username text input field?

New Here ,
Jun 17, 2014

Copy link to clipboard

Copied

In Android devices, predictive text is making impossible for users to log on. When predictive text is turned off, the username text input works fine. When predictive text is turned on, the device adds text as you type in the username. Is there anyway to stop this? The only way to stop this right now is to enable the display as password option for the text input. But that is weird, so I would like to know if someone has another suggestion.

TOPICS
Performance issues

Views

900

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 17, 2014 0
Engaged ,
Jun 18, 2014

Copy link to clipboard

Copied

You can use StageText instead of a regular TextField object. I just created a quick text of using StageText and tested it on my Moto X. One of the properties of StageText is "autoCorrect". I use the Google Keyboard and it still gave suggestions for autocorrect but it didnt automatically fix the "broken" words for me. Below is the code I used for a quick test I did on my phone.

import flash.text.StageText;

import flash.geom.Rectangle;

var textfield:StageText = new StageText();

textfield.autoCorrect = false;

textfield.fontSize = 20;

textfield.stage = this.stage;// must set to make visible. Set to "null" to hide

textfield.viewPort = new Rectangle(10, 10, this.stage.stageWidth - 20, this.stage.stageHeight - 20);

But if you absolutely had to use a TextField, I did think of a possibly ugly solution though. Create two textfields and have them be the same width/height and stacked on top of each other. Set the top one to be of type DYNAMIC and have its mouseEnabled set to false. The bottom one should be set to type INPUT, have its alpha set to 0, and add a listener for the Event.CHANGE event. When that event fires, copy the text from the INPUT textfield to the DYNAMIC textfield. The biggest downside to this is that the user can't tap to change the cursor location accurately or see where the cursor is. I tested this and it does work, but is not the ideal solve.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2014 0
EastMan LATEST
New Here ,
Jul 23, 2014

Copy link to clipboard

Copied

wadewalker

Thank you for taking the time to provide a suggestion. I apologize for not replying sooner. Fortunately, the new update of Adobe AIR fixed the problem. Thanks again. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2014 0