We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfAutoComplete Suggestion box hiding under the keyboard on android

Thread ID:

Created:

Updated:

Platform:

Replies:

150309 Dec 31,2019 08:16 PM UTC Feb 17,2020 09:53 AM UTC Xamarin.Forms 8
loading
Tags: SfAutoComplete
andrew bednarz
Asked On December 31, 2019 08:16 PM UTC

SFAutoComplete control's suggestion box is hiding under the keyboard on Android. I have set the placement of the suggestion box to be "top" but it appears that the control does not realize that the keyboard has been displayed and the screen has scrolled up to keep the textbox in focus. Typically the Suggestionbox is rendered where the corresponding textbox was when it was originally clicked. Is there a fix for this? Can I manually set the location of that box? 

Thanks in advance.

Hemalatha Marikumar [Syncfusion]
Replied On January 2, 2020 02:05 PM UTC

Hi Andrew,

Greetings from Syncfusion.

We have analyzed the reported issue of “Suggestion box hiding under the keyboard”. This can be occurred while popup the keyboard, dropdown has been displayed based on the dropdown height. You can full fill this requirement by setting MaximumDropDownHeight as like below code snippet.

Code snippet: 
<autocomplete:SfAutoComplete DisplayMemberPath="Name" MaximumDropDownHeight="200" 
                                     DataSource="{Binding EmployeeCollection}" /> 
  
Please let us know if you have any other queries.

Regards,
 
Hemalatha M. 


andrew bednarz
Replied On January 2, 2020 02:18 PM UTC

Hello, 
Thank you for your suggestion but this does not solve my problem. I'll show a code snippet below. Still when I click to type in the SFAutoComplete box, the suggestion box is hidden by the keyboard, when i hit the back button to hide the keyboard, the suggestion box is shown underneath the box. It seems that the Suggestionbox is rendered where the corresponding textbox was when it was originally clicked, not account for the scroll when the keyboard is shown. 
Thanks

       <SyncAuto:SfAutoComplete DataSource="{Binding PotentialData}" DisplayMemberPath="Description" Text="{Binding Data.DisplayData}" MaximumSuggestion="4" 
                                     MaximumDropDownHeight="200" SuggestionBoxPlacement="Top" NoResultsFoundText="Nothing Found." Watermark="Start Typing">




Sakthivel Palaniyappan [Syncfusion]
Replied On January 5, 2020 03:15 PM UTC

Hi Andrew,

Thanks for your update.

We have analyzed your query  and currently we are validating the reported problem of “Suggestion box is hidden by the keyboard in AutoComplete”. We will update the complete details on 7th January 2020. 
We appreciate until your patience.

Regards,
Sakthivel P. 


Hemalatha Marikumar [Syncfusion]
Replied On January 7, 2020 02:01 PM UTC

Hi Andrew,

Thanks for your patience.

We analyzed, and we were able to reproduce the reported issue. This is a known issue, and we have already raised a query about this issue in the Android issue tracker discussion since we have also used PopWindow for SfAutoComplete, and we have attached a link for reference.

Linkhttps://issuetracker.google.com/issues/128579395  

We suggest you use ComboBox for similar as AutoComplete. Using the DropDownOpen event you can customize the position of the PopWindow in SfComboBox as like below code snippet. 
 
XAML: 
<local:CustomComboBox  x:Name="comboBox" IsEditableMode="True" MultiSelectMode="Delimiter" VerticalOptions="Center" Watermark="Start typing" 
                                     HeightRequest="40"  SuggestionBoxPlacement="Top" 
                                     DisplayMemberPath="Name" MaximumDropDownHeight="300" 
                                     DataSource="{Binding EmployeeCollection}"/> 
  

C#:
 
comboBox.DropDownButtonSettings = new Syncfusion.XForms.ComboBox.DropDownButtonSettings() { Width = 0, Height = 0 }; 
  
Custom Renderer: 
[assembly: ExportRenderer(typeof(CustomComboBox), typeof(ComboBoxRenderer))] 
namespace AutoCompleteSample.Droid 
{ 
  
    public class ComboBoxRenderer : SfComboBoxRenderer 
    { 
        public ComboBoxRenderer(Context context) : base(context) 
        { 
        } 
  
        protected override void OnElementChanged(ElementChangedEventArgs<Syncfusion.XForms.ComboBox.SfComboBox> e) 
        { 
            base.OnElementChanged(e); 
            if (e.NewElement != null) 
            { 
                Control.DropDownOpen += Control_DropDownOpen; 
            } 
        } 
        private void Control_DropDownOpen(object sender, EventArgs e) 
        { 
            if (Control.SuggestionBoxPlacement == Syncfusion.Android.ComboBox.SuggestionBoxPlacement.Top) 
            { 
                Control.GetAutoPopUpWindow().ShowAtLocation(this, GravityFlags.NoGravity, 50, 100); 
            } 
        } 
    } 
  
Please let us know if you have any other queries. 
 
Regards, 
Hemalatha M. 


Mark
Replied On February 9, 2020 02:34 AM UTC

I've also come across this issue as well. I have set the MaximumDropDownHeight to reduce the issue for now, but is it still going to be fixed?

Hemalatha Marikumar [Syncfusion]
Replied On February 10, 2020 10:41 AM UTC

Hi Mark,


 
Query: I have set the MaximumDropDownHeight to reduce the issue for now 
 
Thanks for your update. We are glad to hear that. 
 
Query: is it still going to be fixed? 
 
We would like to let you know that we used the PopupWindow component on Android platform to implement the suggestion box. To display it, we just called the popupWindow.Show(), and we didn't handle any specific position as Android itself handles that. So, we have tried different options, but Android overrides the settings and displays the popup. 

This is the reason we logged a report to Android and there is no progress. We will make every possible way to rectify the same from our side in feature release.

https://issuetracker.google.com/issues/128579395

Please let us know if you have any concerns.

Regards,
Hemalatha M.
 


Mark
Replied On February 14, 2020 12:01 PM UTC

Great to hear, i've commented on the issue on google's bug tracker, hopefully they look into fixing it soon.

Divya Venkatesan [Syncfusion]
Replied On February 17, 2020 09:53 AM UTC

Hi Mark, 
 
Thanks for the update. We are also having followup with the issue and we will share you if we get any updates. 
 
Regards, 
Divya Venkatesan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon