Xamarin.Forms 标签页中的标题截断 [英] Title cutoff in tabbed page in Xamarin.Forms
本文介绍了Xamarin.Forms 标签页中的标题截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
标签页标题在Android标签页中被截断
Tabbed page title cut off in tabbed page in Android
但在 iOS 设备中运行良好
but working fine in iOS Device
我正在使用此代码
public Tabbar()
{
//this.BarTextColor = Color.Maroon;
// New Feed
var navigationNewFeed = new NavigationPage(new NewFeedView());
navigationNewFeed.Title = "News Feed";
navigationNewFeed.Icon = "news";
Children.Add(navigationNewFeed);
// Volunteer View
var navigationPageVolunteer = new NavigationPage(new VolunteerView());
navigationPageVolunteer.Icon = "Volunteer";
navigationPageVolunteer.Title = "Volunteer";
Children.Add(navigationPageVolunteer);
// LAH View
var navigationPageLAH = new NavigationPage(new LAHView());
navigationPageLAH.Icon = "lah";
navigationPageLAH.Title = "LAH";
Children.Add(navigationPageLAH);
// Notification View
var navigationPageNotification = new NavigationPage(new NotificationView());
navigationPageNotification.Icon = "notification";
navigationPageNotification.Title = "Notification";
Children.Add(navigationPageNotification);
// Account View
var navigationPageAccount = new NavigationPage(new AccountView());
navigationPageAccount.Icon = "account";
navigationPageAccount.Title = "Account";
Children.Add(navigationPageAccount);
}
推荐答案
尝试在您的 Android XF 项目上通过 Tabbar.axml
设置较小的文本大小,添加 app:tabTextAppearance="?android:attr/textAppearanceSmall"
Try setting a lower text size through Tabbar.axml
on your Android XF Project, adding app:tabTextAppearance="?android:attr/textAppearanceSmall"
<android.support.design.widget.TabLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabTextAppearance="?android:attr/textAppearanceSmall"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="fill"
app:tabMode="fixed" />
这篇关于Xamarin.Forms 标签页中的标题截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文