Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

ViewCell does not adapt the size correctly in PCL project... and more

$
0
0

I am trying to create a Xamarin.Forms app to demonstrate the usage of my WordPressUniversal Library. However, I have a few problems.

This code shows different results on Windows Phone and Android (haven't tested iOS yet):

<ListView x:Name="heroappslistview">
        <ListView.ItemTemplate>
          <DataTemplate>
            <ViewCell>
              <ViewCell.View>
                <StackLayout Orientation="Horizontal" Padding="12,12,12,12" >
                  <Image Source="{Binding featured_image_url}" HeightRequest="60" ></Image>
                  <Label Text="{Binding title}" YAlign="Center" Font="32"></Label>
                </StackLayout>
              </ViewCell.View>
            </ViewCell>
          </DataTemplate>
        </ListView.ItemTemplate>
      </ListView>

Windows Phone does its rendering job like it should, while Android (on a Galaxy S5 does not respect the height request:
image
image

On top, the tabbed page does not get positioned within the apps frame on Android. I tried this:

<TabbedPage.Padding>
    <OnPlatform x:TypeArguments="Thickness">
      <OnPlatform.Android>10,20,0,0</OnPlatform.Android>
      <OnPlatform.iOS>10,20,0,0</OnPlatform.iOS>
    </OnPlatform>
  </TabbedPage.Padding>

Any tips are highly appreciated.


Viewing all articles
Browse latest Browse all 58056


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>