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

Custom ViewCell not appearing on Android

$
0
0

I'm trying to make the following DataTemplate work on Android (WP and iOS work fine).

<DataTemplate x:Key="DatumPageEntry">
        <ViewCell>
          <ViewCell.View>
            <StackLayout Orientation="Horizontal">
              <StackLayout Orientation="Vertical">
                <Label Text="{Binding Date.Date}" />
                <Label Text="{Binding Mode}" />
                <Label Text="{Binding Topic}" />
              </StackLayout>
              <Label Text="{Binding Value}" />
            </StackLayout>
          </ViewCell.View>
        </ViewCell>
      </DataTemplate>

It renders fine on Windows Phone (a bit crude, the important part for now is that the data appears), and on iOS too. But our Android device seems to be stubborn - it will render the list items (this DataTemplate goes into a ListView as ItemTemplate), but not their content. And yes I did check, it is not just about the text being the same colour as the background - the text should be visible when clicked, if it was so.

Has anyone had similar issues? Truth to be told, we suck a lot because Android does not react the same way to the layouts and code as the other two platform, and it simply makes development in Forms 1hr coding 7hr debugging on Android.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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