Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android AutoSuggestBox Suggestion Stops Working #1012

Closed
7 tasks
iosub opened this issue Jun 4, 2019 · 1 comment · Fixed by #1069
Closed
7 tasks

Android AutoSuggestBox Suggestion Stops Working #1012

iosub opened this issue Jun 4, 2019 · 1 comment · Fixed by #1069
Assignees
Labels
kind/bug Something isn't working platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform

Comments

@iosub
Copy link
Contributor

iosub commented Jun 4, 2019

Android AutoSuggestBox Suggestion Stops Working

Current behavior

private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
{
if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
{
Suggestions.Clear();
Suggestions.Add(sender.Text + "1");
Suggestions.Add(sender.Text + "2");
}
Control2.ItemsSource = Suggestions;
}
Only in Android, this code hang adding new suggestions, first Keypress Work, Second KeyPress hang the app
AutoSugges.zip

Expected behavior

How to reproduce it (as minimally and precisely as possible)

Environment

Nuget Package:
"Uno.UI" Version="1.45.0-dev.1707"
"Uno.Wasm.Bootstrap" Version="1.0.0-dev.281"
Package Version(s):

Affected platform(s):

  • iOS
  • [X ] Android
  • WebAssembly
  • Windows
  • Build tasks

Visual Studio

  • 2017 (version: )
  • [X ] 2019 (version: 16.1 )
  • for Mac (version: )

Relevant plugins

  • Resharper (version: )

Anything else we need to know?

@ghuntley ghuntley added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform kind/bug Something isn't working labels Jun 7, 2019
@jeromelaban
Copy link
Member

jeromelaban commented Jun 11, 2019

A workaround can be to copy the following template:

https://github.com/nventive/Uno/blob/94f551bf21793c87fff1f88173ac1ad488fd8043/src/Uno.UI/UI/Xaml/Style/Generic/Generic.xaml#L8309

But with a non-virtualizing panel for the list view in the popup:

<ListView.ItemsPanel>
  <ItemsPanelTemplate>
   <StackPanel />
  </ItemsPanelTemplate>
</ListView.ItemsPanel>

This will prevent the app from freezing (into a recycling loop, @davidjohnoliver that may interest you), but the popup is stealing the focus, so you have to tap the textbox after the searchbox appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants