我有一个要求,例如在TabbedPage中添加更多的选项卡。最初它的数量是5且工作正常。而我又添加了一个选项卡(例如6th),则该应用的Android版本触发了'illegalArgumentException'< / p>
IOS版本不会触发任何错误,而是将标签从第5个位置加载到外观不太好的新列表视图中。
对此表示赞赏。
答案 0 :(得分:0)
如何使用按钮和图标字体代替tabbedPage? 您可以显示6个或更多按钮。
xaml
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Put contents here -->
<StackLayout Grid.Row="0"
Orientation="Horizontal" HorizontalOptions="FillAndExpand" VerticalOptions="End"
>
<Button FontFamily="{DynamicResource MaterialFontFamily}"
Text="󱔔" FontSize="Large" TextColor="Blue"
HorizontalOptions="CenterAndExpand" BackgroundColor="Transparent" />
<Button FontFamily="{DynamicResource MaterialFontFamily}"
Text="󱔓" FontSize="Large" TextColor="Blue"
HorizontalOptions="CenterAndExpand" BackgroundColor="Transparent" />
<Button FontFamily="{DynamicResource MaterialFontFamily}"
Text="󱔒" FontSize="Large" TextColor="Blue"
HorizontalOptions="CenterAndExpand" BackgroundColor="Transparent" />
<Button FontFamily="{DynamicResource MaterialFontFamily}"
Text="󱔑" FontSize="Large" TextColor="Blue"
HorizontalOptions="CenterAndExpand" BackgroundColor="Transparent" />
<Button FontFamily="{StaticResource MaterialFontFamily}"
Text="󱖌" FontSize="Large" TextColor="Blue"
HorizontalOptions="CenterAndExpand" BackgroundColor="Transparent" />
<Button FontFamily="{DynamicResource MaterialFontFamily}"
Text="󱕃" FontSize="Large" TextColor="Blue"
HorizontalOptions="CenterAndExpand" BackgroundColor="Transparent"/>
</StackLayout>
</Grid>