maui
maui copied to clipboard
[Android] Ensure all controls in Layout with Search Bar are visible in Landscape Mode
Root cause
- When search bar changes from portrait to horizontal orientation, other controls does not visible which align before and after the search bar.
- When clicking on the search icon or search button after cursor interacting with search bar, cursor does not unfocused.
- Therefore, other controls do not show in view and search bar only visible in output.
Description of Change
- When we are clicking on the search button, other controls visible which align before and after the search bar, due to search bar QueryTextSubmitEventArgs handled value is false.
- When cursor unfocussed after clicking on the search button or search icon that It prevents the search bar taking from whole screen space when it aligns in horizontal orientation or landscape orientation.
Reference
https://github.com/dotnet/maui/blob/main/src/Core/src/Handlers/Entry/EntryHandler.Android.cs#L190
Issues Fixed
Fixes #14708
Output: Before changes:
After changes:
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
Azure Pipelines successfully started running 3 pipeline(s).
Azure Pipelines successfully started running 3 pipeline(s).
Closing this PR for now
I realize in XF we would clear the focus when the user clicked search but this behavior was incorrect and not the default behavior on the platform.
There is never a scenario where we want modify the focus. If the user wants to modify the focus they can use the APIs provided