We're hoping to use this control for two purposes:
a) when the Text field is empty, show the user a set of past searches - whether the user has just set the focus to an empty control, or, has deleted the last character
b) once the user types, hide the suggestions until the user has typed enough characters that we can provide search suggestions from an API
Using your source code I have verified that the above change to the NativeAutoSuggestBox.Android.cs file would give us the behaviour we're looking for.
Is this a change you would be willing to make?
If not, how is this code licensed and may we fork it?
Description
We're hoping to use this control for two purposes: a) when the Text field is empty, show the user a set of past searches - whether the user has just set the focus to an empty control, or, has deleted the last character b) once the user types, hide the suggestions until the user has typed enough characters that we can provide search suggestions from an API
The control gives us this behaviour on iOS; however, on Android, because of this defined behaviour: https://developer.android.com/reference/android/widget/AutoCompleteTextView.html?hl=de#setThreshold%28int%29 the control will not display the suggestion list if the Text property is empty. Setting Threshold=0, as is done in the current code, is not the solution since a value of 0 is treated the same as a value of 1, by design.
According to the following StackOverflow article, one way to force this behaviour is to override the EnoughToFilter() method to always return true. https://stackoverflow.com/questions/2126717/android-autocompletetextview-show-suggestions-when-no-text-entered
Using your source code I have verified that the above change to the NativeAutoSuggestBox.Android.cs file would give us the behaviour we're looking for.
Is this a change you would be willing to make? If not, how is this code licensed and may we fork it?
Version 1.0.0