From 5838c9545e775d9f0586e2b654ed538d9a85ee51 Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期二, 20 六月 2017 09:57:31 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/base/MainActivity.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/base/MainActivity.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/base/MainActivity.java index bb6340e..5e7e7c8 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/base/MainActivity.java +++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/base/MainActivity.java @@ -13,6 +13,7 @@ import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; @@ -72,7 +73,8 @@ mTabLayout.setTabMode(TabLayout.MODE_FIXED); for (int i = 0; i < mTabLayout.getTabCount(); i++) { TabLayout.Tab tab = mTabLayout.getTabAt(i); - tab.setCustomView(myFragmentPagerAdapter.getTabView(i)); + LinearLayout view = (LinearLayout)myFragmentPagerAdapter.getTabView(i); + tab.setCustomView(view); if (i == 0) { tab.getCustomView().setSelected(true); } -- Gitblit v1.8.0