我對Xamarin Forms真的很陌生,我剛剛被賦予調整此應用程序的Android版本UI的任務。在Android手機上,用戶界面看起來很好,但在平板電腦上它有點小。所以我開發了一個新的頁面,當設備是平板電腦時,但我似乎無法調整StackLayout元素的高度。這裏是代碼:調整StackLayout元素的高度
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout VerticalOptions="Fill" Spacing="0" Padding="0" Margin="0">
<StackLayout VerticalOptions="Fill" HeightRequest="60" Padding="2" Orientation="Horizontal">
<Label VerticalOptions="Center" FontSize="19" Margin="14,0,0,0" Text="{Binding Name}" TextColor="White" ></Label>
<Image VerticalOptions="Center" HorizontalOptions="EndAndExpand" HeightRequest="50" WidthRequest="30" Source="imgArrow.png"></Image>
</StackLayout>
<BoxView Margin="0,2,0,0" HeightRequest="0.5" BackgroundColor="White" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
知道我在HeightRequest字段中放置了什麼值,它看起來總是一樣的。我相信我在這裏錯過了一些完全基礎的東西。屏幕https://imgur.com/MAHgOgr的外觀如下。我只是希望它佔用更多的空間,這將涉及增加字體大小,但是當我這樣做時,它看起來很糟糕。 pic with font size 40。任何幫助,我可以得到非常感謝。謝謝!
非常感謝。有用! – Ryan