We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
**app:tl_textBold="SELECT"**的情况下,默认选中的第一项未加粗,这个问题是没麻烦作者修复一下。 <com.flyco.tablayout.SlidingTabLayout android:id="@+id/stl_tab" android:layout_width="match_parent" android:layout_height="40dp" app:tl_divider_color="@color/transparent" app:tl_divider_padding="13dp" app:tl_divider_width="1dp" app:tl_indicator_color="@color/common_primary_color" app:tl_indicator_height="2dp" app:tl_indicator_width_equal_title="true" app:tl_tab_padding="15dp" app:tl_tab_space_equal="true" app:tl_textBold="SELECT" app:tl_textSelectColor="@color/common_text_title_color" app:tl_textUnselectColor="@color/common_text_explain_color" app:tl_textsize="15sp" app:tl_underline_color="@color/transparent" app:tl_underline_height="0dp" />
The text was updated successfully, but these errors were encountered:
自己改吧,老BUG了,好多年了
Sorry, something went wrong.
怎么改这个
updateTabStyles()这个方法处 要将TEXT_BOLD_WHEN_SELECT 这里添加上 if (mTextBold == TEXT_BOLD_BOTH) { tv_tab_title.getPaint().setFakeBoldText(true); } else if (mTextBold == TEXT_BOLD_WHEN_SELECT) { if (i == 0) { tv_tab_title.getPaint().setFakeBoldText(true); } } else if (mTextBold == TEXT_BOLD_NONE) { tv_tab_title.getPaint().setFakeBoldText(false); }
还有一个临时解决办法就是先设置一个其他的,再设置第一个,这样也可以 mSlideTabLayout.setCurrentTab(1); mSlideTabLayout.setCurrentTab(0);
No branches or pull requests
**app:tl_textBold="SELECT"**的情况下,默认选中的第一项未加粗,这个问题是没麻烦作者修复一下。
<com.flyco.tablayout.SlidingTabLayout
android:id="@+id/stl_tab"
android:layout_width="match_parent"
android:layout_height="40dp"
app:tl_divider_color="@color/transparent"
app:tl_divider_padding="13dp"
app:tl_divider_width="1dp"
app:tl_indicator_color="@color/common_primary_color"
app:tl_indicator_height="2dp"
app:tl_indicator_width_equal_title="true"
app:tl_tab_padding="15dp"
app:tl_tab_space_equal="true"
app:tl_textBold="SELECT"
app:tl_textSelectColor="@color/common_text_title_color"
app:tl_textUnselectColor="@color/common_text_explain_color"
app:tl_textsize="15sp"
app:tl_underline_color="@color/transparent"
app:tl_underline_height="0dp" />
The text was updated successfully, but these errors were encountered: