高亮文本
private void highlightTextView(int pos) {
for (int i = 0; i < getChildCount(); i++) {
View view = getChildAt(i);
if (view instanceof TextView) {
((TextView)view).setTextColor(默认颜色);
if (i == pos)
((TextView)view).setTextColor(高亮颜色);
private void highlightTextView(int pos) {
for (int i = 0; i < getChildCount(); i++) {
View view = getChildAt(i);
if (view instanceof TextView) {
((TextView)view).setTextColor(默认颜色);
if (i == pos)
((TextView)view).setTextColor(高亮颜色);
2016-05-10
1.滑动到所有子view的倒数第2个时,整个ViewPagerIndicator的view不需要移动了,只需要移动三角指针就行了,所以
if ((position >= (mTabVisibleCount - 2)) && position < getChildCount() - 2 && offset > 0 && getChildCount() > mTabVisibleCount) {
……
this.scrollTo();
2.三角指针的mTranslationX一直在变大,它为什么没动?
其实它动了,没动的话怎么跑到下一个tab下面了呢?呵呵,你懂的。。。
if ((position >= (mTabVisibleCount - 2)) && position < getChildCount() - 2 && offset > 0 && getChildCount() > mTabVisibleCount) {
……
this.scrollTo();
2.三角指针的mTranslationX一直在变大,它为什么没动?
其实它动了,没动的话怎么跑到下一个tab下面了呢?呵呵,你懂的。。。
1.滑动到所有子view的倒数第2个时,整个ViewPagerIndicator的view不需要移动了,只需要移动三角指针就行了,所以
if ((position >= (mTabVisibleCount - 2)) && position < getChildCount() - 2 && offset > 0 && getChildCount() > mTabVisibleCount) {
……
this.scrollTo();
2.三角指针的mTranslationX一直在变大,它为什么没动?
其实它动了,没动的话怎么跑到下一个tab下面了呢?呵呵,你懂的。。。
if ((position >= (mTabVisibleCount - 2)) && position < getChildCount() - 2 && offset > 0 && getChildCount() > mTabVisibleCount) {
……
this.scrollTo();
2.三角指针的mTranslationX一直在变大,它为什么没动?
其实它动了,没动的话怎么跑到下一个tab下面了呢?呵呵,你懂的。。。
2016-05-09