Skip to content

[Android][Label] Setting a Label visible after having had focus on a InputView will increase the Label's height #29194

@Vetle444

Description

@Vetle444

Description

If you have a Label that is invisible, and then setting it to visible after having had focus on a InputView increases its height. It does not matter if you lose focus on the InputView, and then set the Label visible. However, if you toggle the Label's visibility, and then set focus on InputView, the Label will not increase its height.

Image

Steps to Reproduce

  1. Clone https://github.com/Vetle444/MauiTestApp/tree/vefi/focusFirstIsVisibleTrueExpandingHeight/MauiTestApp
  2. Make sure to be on branch: vefi/focusFirstIsVisibleTrueExpandingHeight/MauiTestApp
  3. Run app
  4. Click Navigate
  5. Tap on the Entry
  6. Tap on the Switch
  7. The Label's height is increased

Link to public reproduction project repository

https://github.com/Vetle444/MauiTestApp/tree/vefi/focusFirstIsVisibleTrueExpandingHeight/MauiTestApp

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.50 SR3

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

Override CreatePlatformView with a regular AppCompatTextView in handler, however, this most likely provokes some bugs

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions