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

Issue with vertical and horizontal scroll in Xamarin Forms (Android)

$
0
0

I am new to Xamarin. I am trying to create a sample in Xamarin forms with 5 custom horizontallistviews (I have used renderers to achieve the same in different platforms. It works perfectly (scrolls horizontally) when I have only 2 of these controls on screen. When I add all the 5 I have to add these controls inside a ScrollView oriented vertically so that I can see all the controls. When I do that I am only able to scroll the page vertically. I am not able to scroll the individual controls (horizontallistviews) horizontally.

This issue is only with Android. It works fine in Windows Phone.

Below is my code:

<ScrollView Orientation="Vertical">
   <StackLayout Padding="5, 25" Orientation="Vertical" VerticalOptions="FillAndExpand">
      <Image Source ="label_entertainment.png" HorizontalOptions="Start"/>
      <local:HorizontalListViewEntertainment x:Name="entertainmentView" Items="{Binding Spotlight}" HeightRequest="198"/>
      <Image Source ="label_music.png" HorizontalOptions="Start"/>
      <local:HorizontalListViewMusic x:Name="musicListView" Items="{Binding Music}" HeightRequest="198"/>
      <Image Source ="label_movies.png" HorizontalOptions="Start"/>
      <local:HorizontalListViewMovies x:Name="movieListView" Items="{Binding Movies}" HeightRequest="198"/>
      <Image Source ="label_celebrities.png" HorizontalOptions="Start"/>
      <local:HorizontalListViewCelebrities x:Name="celebritiesListView" Items="{Binding Celebrities}" HeightRequest="198"/>
      <Image Source ="label_style.png" HorizontalOptions="Start"/>
      <local:HorizontalListViewStyle x:Name="styleListView" Items="{Binding Celebrities}" HeightRequest="198"/>
  </StackLayout>

I found a solution here:

However it doesn't work in my case because I don't have inner scroll views. Please help. Thank you!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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