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