Bug 43811 - KeyboardFlags.None does not turn off suggestions on Android
Summary: KeyboardFlags.None does not turn off suggestions on Android
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-27 23:41 UTC by adrianknight89
Modified: 2016-10-06 16:58 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description adrianknight89 2016-08-27 23:41:49 UTC
When you create an entry with no keyboard flags, capitalization and spellcheck are off, but suggestions are still visible on some Android devices (tested on S6). Samsung seems to ignore developer choice and still displays user value of predictive text.

The workaround seems to be using InputTypes.TextVariationVisiblePassword, but this is a hack. It turns off language toggling as well as Swype mode on soft keyboards.

https://github.com/xamarin/Xamarin.Forms/blob/2d9288eee6e6f197364a64308183725e7bd561f9/Xamarin.Forms.Platform.Android/Renderers/KeyboardExtensions.cs

We can change the code so that suggestions are disabled:

if (!capitalizedSentenceEnabled && !spellcheckEnabled && !suggestionsEnabled)
      result = InputTypes.ClassText | InputTypes.TextFlagNoSuggestions | InputTypes.TextVariationVisiblePassword;

NOTE: Adding password flag to the Chat keyboard gets rid of capitalization so this only works for custom keyboard where !capitalizedSentenceEnabled && !spellcheckEnabled && !suggestionsEnabled.
Comment 1 Chris King 2016-10-06 16:05:30 UTC
Will check with Jason to see what the policy is wrt introducing special behavior in a attempt to hide bugs like Samsung not honoring flags.
Comment 2 Chris King 2016-10-06 16:58:16 UTC
Sorry, we won't be adding adding patches to hide Samsung bugs (at least this time). If we had to patch for every underling bug we'd introduce a lot of nasty backwards compat behavior.