title: Reducing the height of horizontal listview - xamarin forms
body: <p>I am trying to get a horizontal listview scrolling horizontally having some numbers(0-23) as items in it.</p>
  
  <p>I am getting the listview as horizontal but the height of the listview is not getting wrapped to the content. I tried using RelativeLayout with xConstraint, yConstraint, width and heightConstraint, I tried changing the parameter values in it but the listview disappears all the times I change the values.</p>
  
  <pre><code>ListView lv = new ListView
          {
              SeparatorVisibility = SeparatorVisibility.None,
              ItemsSource = items,
              Rotation = 270,
  
              ItemTemplate = new DataTemplate(() =&gt;
              {
  
                  Label label = new Label()
                  {
                      Rotation = 90,
                      TextColor = Color.Black,
                      HorizontalTextAlignment = TextAlignment.Center,
                      FontSize = Device.GetNamedSize(NamedSize.Small, new Label())
                  };
                  label.SetBinding&lt;User&gt;(Label.TextProperty, indexer =&gt; indexer.Time);
  
                  return new ViewCell
                  {
                      View = new StackLayout
                      {
                          Children =
                              {
                              label
                          }
                      }
                  };
              })
          };
  
          RelativeLayout rLayout = new RelativeLayout();
  
          rLayout.Children.Add(lv,
                               xConstraint: Constraint.RelativeToParent((parent) =&gt;
                                {
                                    return (parent.Width / 0.5) - 30;
                                }),
                               yConstraint: Constraint.RelativeToParent((parent) =&gt;
                                {
                                    return (parent.Height / -0.5) + 3;
                                }),
                               widthConstraint: Constraint.Constant(60),
                               heightConstraint: Constraint.RelativeToParent((Parent) =&gt;
                                {
                                    return (Parent.Height / 10);
                                })
          );
  
          Content = new StackLayout
          {
              Children = {
                  rLayout
              }
          };
  </code></pre>
  
  <p>I am new to xamarin, may be the way I am going is wrong. If so please suggest me the right one.. But as of total I want a horizontal listview having only numbers as items and I want the height to be wrapped to the content. </p>
  
  <p>Please any help would be appreciable.. thanks in advance..</p>