Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Android NavigationPage.TitleView FillAndExpand not working as expected #12392

Open
AlleSchonWeg opened this issue Oct 7, 2020 · 2 comments

Comments

@AlleSchonWeg
Copy link
Contributor

Description

If you have this simple xaml:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="TestApp.Views.TestPage">
  <NavigationPage.TitleView>
    <StackLayout BackgroundColor="Red"
                 VerticalOptions="FillAndExpand"
                 HorizontalOptions="FillAndExpand">
      <Label Text="Text"/>
    </StackLayout>
  </NavigationPage.TitleView>
  <ContentPage.Content>
    <Label Text="LabelText"
           HeightRequest="30"
           WidthRequest="80"
           HorizontalTextAlignment="Center" />
  </ContentPage.Content>
</ContentPage>

the StackLayout should fill the whole space on android.

Expected Behavior

Stacklayout should fill the whole space.

Actual Behavior

See screenshots. On iOS it works as expected.

Basic Information

  • Version with issue: 4.8.0.1364
  • Last known good version:
  • IDE: VS 2019
  • Platform Target Frameworks:
    • iOS:
    • Android: Android 9
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

iOS:
ios_titleview

Android:
android_titleview

Reproduction Link

Workaround

@AlleSchonWeg AlleSchonWeg added s/unverified New report that has yet to be verified t/bug 🐛 labels Oct 7, 2020
@jsuarezruiz
Copy link
Contributor

Attached a reproduction sample:
Issue12392.zip

@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Oct 7, 2020
@Cfun1
Copy link

Cfun1 commented Dec 10, 2020

Maybe this is the same issue why HorizontalOptions="CenterAndExpand" is not working also, found the issue in question #4848.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants