Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Entry.VerticalTextAlignment ignored if layouted in Grid row with fix height #21717

Open
Friedrich78 opened this issue Apr 9, 2024 · 2 comments · May be fixed by #21966
Open

Android: Entry.VerticalTextAlignment ignored if layouted in Grid row with fix height #21717

Friedrich78 opened this issue Apr 9, 2024 · 2 comments · May be fixed by #21966
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@Friedrich78
Copy link

Description

The Entry text is always top-layouted even I set VerticalTextAlignment to End or Center and VerticalOptions="Fill".
The entry background is filled correctly (full height) but it seems like the alignment considers only the minimal height.

When the HeightRequest is set explicitly on the Entry then everything is fine, the VerticalTextAlignment property is considered properly.

Its simple to reproduce!

Steps to Reproduce

  1. Create new MAUI default project with Visual Studio 17.9.2 and latest net8.0 and Android target
  2. Modify Mainpage with the XAML code below
  3. Expected behavior: "Hello" text should be aligned on bottom within the Aqua colored entry (but it is layout on top, bug?!)

XAML for Mainpage.xaml:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="200"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

    <Entry  HorizontalOptions="Fill" VerticalOptions="Fill" HorizontalTextAlignment="End" VerticalTextAlignment="End" Text="Hello"
           BackgroundColor="Aqua"/>
</Grid>

image

Link to public reproduction project repository

No response

Version with bug

8.0.6 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 34

Did you find any workaround?

No response

Relevant log output

No response

@Friedrich78 Friedrich78 added the t/bug Something isn't working label Apr 9, 2024
@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 9, 2024
@ninachen03
Copy link
Collaborator

Verified this issue with Visual Studio 17.10.0 Preview 2(8.0.14 & 8.0.3). Can repro on android platform.
image

@Friedrich78
Copy link
Author

Issue also occurs for Picker control on Android.
Steps to reproduce: Just replace the Entry in the XAML above with the Picker and provide ItemSource

kubaflo added a commit to kubaflo/maui that referenced this issue Apr 21, 2024
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants