[Shell] Unable to focus and unfocus search handler for Android
#7,956 opened on 2019/10/11
Repository metrics
- Stars
- (5,644 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
Description
The event focus is not called when search bar got focus and the same issue happens with unfocus for Android. A similar bug has been reported in the follow link https://github.com/xamarin/Xamarin.Forms/issues/5768. Despite of the fact that issue n° 5768 is closed at this moment it still happens in Android. I've tested in the Xaminals example project and even updating the dll of the xamarin.forms to the last version the problem remains.
Steps to Reproduce
- Start with search hidden
- Tap a search icon (toolbaritem or whatever) to open the search (expanded)
- Override in the SearchHandler class the OnFocused event or try to give a name in the control of the Shell.SearchHandler tag in XAML, in the code behind (xaml.cs) create the method protected void Element_Focused(object sender, EventArgs e). Neither the event nor the OnFocused is called when the search bar got focus.
Expected Behavior
The Event in code behind or OnFocused be called.
Actual Behavior
Cannot
Basic Information
It can be tested in the Xaminals project example, link to download https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/userinterface-xaminals/
- Version with issue:
- Last known good version:
- IDE: Visual Studio Professional 2019.
- Platform Target Frameworks: Xamarin Forms.
- Android:
- Nuget Packages: Xamarin.Forms.dll 4.3.0.851321-pre3 (last version at this moment).
- Affected Devices: Samsumg galaxy S10 (emulator android 9.0); Samsumg galaxy S6 (emulator android 5.1) and Motorola Moto e (physical android 8.0)
Screenshots
The screenshots is attached.