diff --git a/TAB_README.md b/TAB_README.md index cfc0771..88ed830 100644 --- a/TAB_README.md +++ b/TAB_README.md @@ -361,7 +361,7 @@ private void resFlow(){ |tab_action_orientaion|integer|left坐标,right右边,只支持 tri、rect 两种效果| |tab_isAutoScroll|boolean|是否支持自动滚动,默认为true| |tab_visual_count|integer|可视化个数,比如有一排,我们就只要显示4个,此时宽度均分| -|tab_width_equals_text|boolean|rect 是否根据text的大小来,目前只支持rect和带viewpager的情况| +|tab_width_equals_text|boolean|rect 是否根据text的大小来,目前只支持rect和带viewpager和不放大的情况| **TabColorTextView** diff --git a/appx/src/main/res/layout/item_color_msg.xml b/appx/src/main/res/layout/item_color_msg.xml index 9c95fa9..96ef8b5 100644 --- a/appx/src/main/res/layout/item_color_msg.xml +++ b/appx/src/main/res/layout/item_color_msg.xml @@ -17,10 +17,11 @@ android:paddingBottom="6dp" android:paddingStart="12dp" android:paddingEnd="12dp" - android:textSize="14sp" + android:textSize="18sp" app:colortext_default_color="@color/unselect" app:colortext_change_color="@color/colorAccent" android:gravity="center" + android:textStyle="bold" android:layout_height="wrap_content"/> diff --git a/tablibx/src/main/java/com/zhengsr/tablib/view/TabColorTextView.java b/tablibx/src/main/java/com/zhengsr/tablib/view/TabColorTextView.java index be4f31a..2d3628b 100644 --- a/tablibx/src/main/java/com/zhengsr/tablib/view/TabColorTextView.java +++ b/tablibx/src/main/java/com/zhengsr/tablib/view/TabColorTextView.java @@ -5,6 +5,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; +import android.graphics.Typeface; import android.util.AttributeSet; import android.util.Log; import android.view.Gravity; @@ -55,10 +56,13 @@ public TabColorTextView(Context context, AttributeSet attrs, int defStyleAttr) { mDefaultColor = ta.getColor(R.styleable.TabColorTextView_colortext_default_color, Color.GRAY); mChangeColor = ta.getColor(R.styleable.TabColorTextView_colortext_change_color,Color.WHITE); ta.recycle(); - mPaint = new Paint(); + /*Paint = new Paint(); mPaint.setAntiAlias(true); mPaint.setDither(true); - mPaint.setTextSize(getTextSize()); + mPaint.setTextSize(getTextSize());*/ + mPaint = getPaint(); + mPaint.setTypeface(Typeface.DEFAULT_BOLD); + Log.d(TAG, "zsr TabColorTextView: "+mPaint.getTypeface().isBold()); } @Override