我在标题视图中删除多余的空格时遇到问题,如下please see the screenshot here下图所示
Ps:我正在使用选项卡式页面,而该栏是导航标题视图。
Toolbar.xml
中设置下面的xml。app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
不要忘记在
Toolbar.xaml
中添加应用程序的名称空间。
xmlns:app="http://schemas.android.com/apk/res-auto"
并检查下面的代码,需要在MainActivity.cs
中添加它。
ToolbarResource = Resource.Layout.Toolbar;
用法:
<NavigationPage.TitleView> <Label Text="Repositories" /> </NavigationPage.TitleView>