From 9acd7120f0943614ceb990af5124e0f907ef8f93 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 30 三月 2021 19:29:27 +0800
Subject: [PATCH] 白色背景修改

---
 library-ViewPagerIndicator/src/com/viewpagerindicator/MTabPageIndicator.java |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/library-ViewPagerIndicator/src/com/viewpagerindicator/MTabPageIndicator.java b/library-ViewPagerIndicator/src/com/viewpagerindicator/MTabPageIndicator.java
index 6d5ddff..09eba70 100644
--- a/library-ViewPagerIndicator/src/com/viewpagerindicator/MTabPageIndicator.java
+++ b/library-ViewPagerIndicator/src/com/viewpagerindicator/MTabPageIndicator.java
@@ -98,6 +98,14 @@
                 MATCH_PARENT));
     }
 
+    private int textColor;
+    private int highLightColor;
+
+    public void setTextColor(int textColor, int highLightColor) {
+        this.textColor = textColor;
+        this.highLightColor = highLightColor;
+    }
+
     public void setOnTabReselectedListener(OnTabReselectedListener listener) {
         mTabReselectedListener = listener;
     }
@@ -143,12 +151,10 @@
         }
         for (int i = 0; i < mTabLayout.getChildCount(); i++) {
 
-            ((TextView) mTabLayout.getChildAt(i)).setTextColor(Color.argb(255,
-                    255, 255, 255));
+            ((TextView) mTabLayout.getChildAt(i)).setTextColor(textColor);
         }
-        // ((TextView) tabView).setTextColor(Color.argb(255, 24, 180,
-        // 237));//argb(255, 6, 124, 246)
-        ((TextView) tabView).setTextColor(Color.argb(255, 247, 219, 0));// 鏈ㄧ摐绯诲垪
+
+        ((TextView) tabView).setTextColor(highLightColor);// 鏈ㄧ摐绯诲垪
         mTabSelector = new Runnable() {
             public void run() {
                 final int scrollPos = tabView.getLeft()
@@ -192,9 +198,10 @@
         tabView.setFocusable(true);
         tabView.setOnClickListener(mTabClickListener);
         tabView.setText(text);
-        tabView.setTextColor(getResources().getColor(R.color.black1));
-        if (IsPad.isPad(tabView.getContext()))
-            tabView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 25);
+        tabView.setTextColor(textColor);
+            tabView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);
+
+        tabView.setBackgroundColor(Color.TRANSPARENT);
 
         if (iconResId != 0) {
             tabView.setCompoundDrawablesWithIntrinsicBounds(iconResId, 0, 0, 0);

--
Gitblit v1.8.0