我正在使用Xamarin.Forms中的跨平台应用程序。这是ContentPage的布局:
<ContentPage.Content>
<ScrollView x:Name="svMarket">
<AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand">
</StackLayout>
<StackLayout x:Name="overLay" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All" IsVisible="false" BackgroundColor="#C0808080">
</StackLayout>
</AbsoluteLayout>
</ScrollView>
</ContentPage.Content>
内容在运行时添加,页面可能会很长。 Scrollview允许我们仅滚动页面的一小部分,页面上的其余内容不可见。此问题仅发生在iOS版本中。在Android上测试时它可以正常工作。
第二个stacklayout仅作为叠加层使用。第一个stacklayout中有许多网格控件,内容在网格中添加。
答案 0 :(得分:0)
我明白了。 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="inputs">
<input type="text" class="form-control" name="regSection[]" required="required">
</div>
<a href="#" id="add">ADD</a>
<button id="check">Check</button>
正在根据行的大小计算xamarin
的总大小。每当gridview
行在单元格中有一个长字符串使得它们占用两行时,大小计算就会变得混乱。因此要解决它需要修剪字符串或手动完成大小计算。
我们选择了第一个解决方案。不确定第二个是否会起作用。