2016-08-12 68 views
1

标签页标题标签页切断Android中标题截止

enter image description here

enter image description here

我使用这个在iOS设备工作正常代码

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); 


     } 
+0

请告诉我,你有没有试过我的建议? –

回答

1

您可以使用自定义样式和更改标签中文本的大小。 How to use custom style for tab

而改变风格:

<style name="CustomTab" 
     parent="@android:style/Widget.Holo.ActionBar.TabText"> 
    <item name="android:textSize">5sp</item> 
</style> 
0

试图通过Tabbar.axml在Android XF项目设置较低的文字大小,添加应用:tabTextAppearance = “机器人: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" />