maui icon indicating copy to clipboard operation
maui copied to clipboard

[Android] Ensure all controls in Layout with Search Bar are visible in Landscape Mode

Open NanthiniMahalingam opened this issue 1 year ago • 12 comments

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:

SearchBarIssue.webm

After changes:

SearchBarOutput.webm

NanthiniMahalingam avatar Aug 13 '24 07:08 NanthiniMahalingam

/azp run

jfversluis avatar Aug 13 '24 08:08 jfversluis

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Aug 13 '24 08:08 azure-pipelines[bot]

/azp run

rmarinho avatar Aug 13 '24 10:08 rmarinho

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Aug 13 '24 10:08 azure-pipelines[bot]

/azp run

PureWeen avatar Aug 18 '24 17:08 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Aug 18 '24 17:08 azure-pipelines[bot]

/azp run

PureWeen avatar Aug 26 '24 21:08 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Aug 26 '24 21:08 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 09 '24 11:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 09 '24 11:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 25 '24 09:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 25 '24 09:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 28 '24 11:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 28 '24 11:10 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 29 '24 11:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 30 '24 12:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 30 '24 12:10 azure-pipelines[bot]

/rebase

NanthiniMahalingam avatar Nov 07 '24 11:11 NanthiniMahalingam

/azp run

jsuarezruiz avatar Nov 12 '24 11:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 12 '24 11:11 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Nov 18 '24 12:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 18 '24 12:11 azure-pipelines[bot]

/rebase

NanthiniMahalingam avatar Nov 21 '24 13:11 NanthiniMahalingam

/rebase

NanthiniMahalingam avatar Nov 21 '24 13:11 NanthiniMahalingam

/azp run

jsuarezruiz avatar Nov 25 '24 16:11 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 25 '24 16:11 azure-pipelines[bot]

/rebase

NanthiniMahalingam avatar Dec 02 '24 10:12 NanthiniMahalingam

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Dec 06 '24 09:12 azure-pipelines[bot]

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Dec 13 '24 13:12 azure-pipelines[bot]

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

PureWeen avatar Jan 06 '25 08:01 PureWeen