Autocomplete control blocked by the keyboard depending on the layout

Posted by: stevecarmichelle1 on 15 April 2018, 7:08 pm EST

    • Post Options:
    • Link

    Posted 15 April 2018, 7:08 pm EST

    Hi,

    Please note that the development is focused on running in iPhone with a 5.5" screen.

    I have a query regarding the property DropDownMode. I am using this property depending on the location of the drop down control on the screen. If this control is placed in the top of the screen then I use the property “BelowOrAbove” since the dropdown will be visible above the keyboard and if the control is placed in the lower half of the screen then it makes sense to use the property “AboveOrBelow”. This works fine but I would like to know if it can detect that the keyboard pops up when the control gets focused and if the dropdown displays behind the keyboard, then the display will shift from BelowOrAbove to Above automatically.

    Currently I am testing the layout of the application on the iPhone with a 5.5" display and if the visibility of the dropdown is blocked then I set the property to “ForceAbove”. Please let me know if there is any way to make this mechanism easy based on the position of the control on the screen with respect to the popping up of the keyboard when it gets focus.

    I have also noticed that when using a plain text box at the end of the screen, the scrolling shifts the screen in such a way so that the text box can be seen and text entered. But when using the autocomplete control, it does not behave that way and is blocked by the keyboard. Please let me know if there is any fix for this.

    Thanks,

    Rajesh

  • Posted 16 April 2018, 12:38 am EST

    Hi Rajesh

    We have a DropDownMode = FullScreen for scenarios like this. That mode is intended to handle this sort of scenario in a predictable way that doesn’t interfere with the software keyboard on small screen devices.

    Kelley

  • Posted 16 April 2018, 1:16 am EST

    Hi,

    I was aware of this mode, but due to customer requirements, we are forced to adopt this mechanism so that he can just tap the autocomplete control, type the first few characters and select his choice. Choosing the full screen mode means tapping more to dismiss the dialog which is not an acceptable choice.

    Kindly let me know if there is any work around at least to make the drop down control get the focus and it is visible in the same way as for the text boxes.

    I even implemented this mechanism Soft Input Keyboard Renderer (https://xamarinhelp.com/accommodate-on-screen-keyboard-xamarin-forms/) to enable the autocomplete control to be visible when it has the focus but it doesnt work for this control. But this works perfectly for the text boxes.

    Thanks,

    Rajesh.

  • Posted 24 April 2018, 5:45 pm EST

    Hi,

    I have a request to make to you.

    I tested the functionality of your Autocomplete control when the control is at the bottom of the screen.

    I noticed that when tapping the control. the popup appears above the control but autocomplete control does not get the focus.

    Now when i tap any character on the keyboard, the autocomplete control gets the focus, the cursor is visible, where i can enter any text.

    I would like if you can make the autocomplete control to get the focus the moment it is tapped so that the user can see the cursor and start entering the first few characters.

    This is only for iOS platform

    Thanks,

  • Posted 25 April 2018, 3:13 am EST

    Hi Rajesh

    I don’t see this behavior on my end. Are you working with build 271? It’s possible there’s a bug in a previous build. If you’re still have problems please provide some code so I can try to reproduce it here.

    Thanks

    Kelley

  • Posted 29 April 2018, 5:32 pm EST

    Hi Kelley

    I just updated my project with build 271. I am attaching the project and the video file taken to demonstrate what exactly I am facing.

    The behavior is evident when trying to select the control. Ten and select a value. Only after entering the first character in the keyboard the control gets the focus.

    The video AutoComplete_Hiding (Quick time format) is inside the zip file.

    Looking forward to hearing what can be done to ensure that it behaves like the other controls. Please let me know if you have any doubt.

    Thanks,

    Rajesh.

    AutoComplete_HidingBehindKeyboard.zip

  • Posted 1 May 2018, 12:32 am EST

    Hi Rajesh

    I think I see the issue. The control does have focus, but it looks like the DropDown isn’t correctly re-positioning when inside a scrollview. The textfield portion moves, but the dropdown doesn’t change position and it can cover up the textfield up. Once you start typing it recalculates and redraws the dropdown in the right spot. I’ll talk to the developers about it.

    Kelley

  • Posted 1 May 2018, 3:37 pm EST

    Hi Kelley,

    Thanks and I am glad that you are able to reproduce the issue. It would be helpful if this is fixed inside the scrollview. The drop down should stick to the text box even if the user scrolls the screen and it should work in an elegant screen irrespective of the position on the screen (whether at the top of the screen or the bottom of the screen).

    Thanks,

    Rajesh.

  • Posted 31 May 2018, 12:31 am EST

    Hi Rajesh

    Build 3.0.20181.282 should have a fix for your DropDown scroll into view issue when the keyboard displays, and it should be available today on nuget.org. Let me know if you see any issues.

    Thanks

    Kelley

  • Posted 6 June 2018, 1:10 am EST

    Hi Kelley,

    Thanks for the update. I would like to know what is the minimum version of Xamarin Forms required for this update.

    When trying to update the existing version of C1 components , I am getting this error.

    Could not install package ‘C1.Xamarin.Forms.Core 3.0.20181.288’. You are trying to install this package into a project that targets ‘.NETPortable,Version=v4.5,Profile=Profile111’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

    I already updated the version of Xamarin.Forms to 3.0.0.530893 via Nuget.

    Current version of Visual Studio for Mac is

    Visual Studio Enterprise 2017 for Mac

    Version 7.3.2 (build 12)

    Installation UUID: 6ee396cb-d1de-40d8-ae3a-468d93e8ed70

    Runtime:

    Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit)

    GTK+ 2.24.23 (Raleigh theme)

    Package version: 504010007
    

    NuGet

    Version: 4.3.1.4445

    .NET Core

    Runtime: Not installed

    SDK: Not installed

    MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

    Xamarin.Profiler

    Version: 1.6.0

    Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

    Apple Developer Tools

    Xcode 8.3.3 (12175.1)

    Build 8E3004b

    Xamarin.Mac

    Version: 4.0.0.214 (Visual Studio Enterprise)

    Xamarin.Android

    Version: 7.4.3.1 (Visual Studio Enterprise)

    Android SDK: /Users/mobizent/Library/Developer/Xamarin/android-sdk-macosx

    Supported Android versions:

    6.0 (API level 23)

    SDK Tools Version: 25.2.5

    SDK Platform Tools Version: 25.0.5

    SDK Build Tools Version: 25.0.3

    Java SDK: /usr

    java version “1.8.0_101”

    Java™ SE Runtime Environment (build 1.8.0_101-b13)

    Java HotSpot™ 64-Bit Server VM (build 25.101-b13, mixed mode)

    Android Designer EPL code available here:

    https://github.com/xamarin/AndroidDesigner.EPL

    Xamarin.iOS

    Version: 11.6.1.2 (Visual Studio Enterprise)

    Hash: 6857dfcc

    Branch: xcode9.2

    Build date: 2017-12-04 21:20:41-0500

    Xamarin Inspector

    Version: 1.2.2

    Hash: b71b035

    Branch: d15-1

    Build date: Fri, 21 Apr 2017 17:57:12 GMT

    Build Information

    Release ID: 703020012

    Git revision: 7d0c9d7ad46b125cf4b7bbf9532c0531b6433ce6

    Build date: 2017-12-12 14:03:18-05

    Xamarin addins: 6dddaa49fbecb2695fcdcd6b712eb269e288518c

    Build lane: monodevelop-lion-d15-5

    Operating System

    Mac OS X 10.12.6

    Darwin 16.7.0 Darwin Kernel Version 16.7.0

    Thu Jun 15 17:36:27 PDT 2017

    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

    Would be grateful if you can help to fix this issue.

    Thanks,

    Rajesh

  • Posted 6 June 2018, 2:17 am EST

    Hi Rajesh

    We added Xamarin.Forms 3.0 support into this version, and since it’s using .NET Standard 2.0 the PCLs libraries should be migrated to the new .NET Standard library type. There’s a guide on this process here:

    http://https//xamarinhelp.com/upgrade-pcl-net-standard-class-library/

    Just keep in mind you need to move to 2.0 and not 1.3 as shown in that sample, so you’ll add something like this instead:

    <TargetFramework>netstandard2.0</TargetFramework>
    

    Kelley

  • Posted 7 June 2018, 2:01 am EST

    Hi Kelley,

    Thanks for the guidance, I will do the same (migrate from PCL to .Net Standard 2.0) and let you know the outcome.

    Thanks,

    Rajesh.

  • Posted 8 July 2018, 3:50 pm EST

    Hi Kelly,

    I finally migrated my project to .Net Standard 2.0 in VS 2017. There were a lot of challenges and issues for back ward compatibility for some of the Nuget Packages.

    The functioning of the Autocomplete control is much cleaner and better than before. Thanks for fixing this important bug.

    Will let you know if any issue crops up in future.

    Thanks,

  • Posted 9 July 2018, 5:40 am EST

    Hi Rajesh

    I’m glad to hear it’s working well for you. In about a week we’ll release our next version which has a few more enhancements for the Input controls. We’re adding a clear button that you can toggle on or off for all of the Input controls, a new AutoComplete mode that controls the filtering and highlighting behavior of the suggestions in an AutoComplete (which allows StartsWith, Contains, and EndsWith as well the ability to MatchCase or MatchWholeWord), a Completed event that behaves just like the Entry control in Xamarin.Forms, improved animations, and some further bug fixes. It should be released on July 18th.

    Thanks

    Kelley

  • Posted 23 July 2018, 1:03 am EST

    Hi Kelley,

    Thanks, I am glad to hear that this has been implemented since it is the most crucial way of filtering the data and helps the user to find what he needs. Adding the clear button is also something that was missing earlier.

    Will update and let you know. and a big thanks for improving the Autocomplete control.

    Regards,

    Rajesh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels