Skip to content

Releases: LuckyJayce/ViewPagerIndicator

1.1.9 & 1.1.9-androidx

20 Apr 09:20
Compare
Choose a tag to compare

添加ProxyLazyFragment 懒加载代理fragment,
不用直接继承LazyFragment通过ProxyLazyFragment代理实际的fragment实现懒加载,
用法:

ProxyLazyFragment fragment = ProxyLazyFragment.lazy(BookFragment.class, bundle);

1.1.7 & 1.1.7-androidx

05 Jun 03:08
Compare
Choose a tag to compare

FixedIndicatorView的getItemViewUnCheck方法添加空判断

v1.1.6

18 Jun 12:02
Compare
Choose a tag to compare

Indicator添加setOnIndicatorItemClickListener方法用于拦截处理点击事件,
在OnItemSelectedListener监听之前触发OnIndicatorItemClickListener监听

/**
 * tab项点击监听和拦截
 */
interface OnIndicatorItemClickListener {
    /**
     * @param clickItemView
     * @param position 点击的tab的position
     * @return 返回true表示 拦截点击事件,不会继续触发Indicator的setCurrent和调用OnItemSelectedListener
     *  返回false 按照Indicator原有的处理方式
     */
    boolean onItemClick(View clickItemView, int position);
}

使用:

indicatorView.setOnIndicatorItemClickListener(onItemClickListener);

private Indicator.OnIndicatorItemClickListener onItemClickListener = new Indicator.OnIndicatorItemClickListener() {
        @Override
        public boolean onItemClick(View clickItemView, int position) {
            if (position == TAB_CHAT) {
                startActivity(new Intent(getApplicationContext(), ChatActivity.class));
                    //拦截tab的事件,indicatorView不会切换当前tab,OnItemSelectedListener也不会触发
                return true;
            }
            return false;
        }
    };

v1.1.5

12 Mar 08:55
Compare
Choose a tag to compare

FixedIndicatorView的 adapter 添加null的判断,允许一开始不设置adapter

v1.1.4

30 Nov 03:05
Compare
Choose a tag to compare

修复v4 的 25版本的LazyFragment空白
情景还原:ViewPager 多个子界面,点击上面tab切换,子页面Fragment空白没有加载

v1.1.3

02 Sep 10:08
Compare
Choose a tag to compare
   修复SpringBar点击最后一个tab,第一个tab显示的问题  
   IndicatorViewPager添加setClickIndicatorAnim(boolean anim),用于配置点击tab的是否执行viewPager的切换动画

v1.1.2

12 Aug 04:46
Compare
Choose a tag to compare

修复LazyFragment 的 onCreateViewLazy(Bundle savedInstanceState) 避免获取不到savedInstanceState

1.1.1

11 Aug 02:57
Compare
Choose a tag to compare
  1. 修复BannerComponent 的adapter的count为0 的bug
  2. 优化FragmentListPageAdapter count为很大的数情况,SparseArray代替ArrayList

v1.1.0

08 Aug 08:45
Compare
Choose a tag to compare

1.修复FixedIndicatorView.notifyDataChange, setCurrentItem的字体选中的位置不对
2.LazyFragment 添加getPreviewLayout(),继承重写可以在未显示真正布局时显示一个预加载的布局.

v1.0.7

24 Jun 19:26
Compare
Choose a tag to compare

1.添加了RecyclerView实现的RecyclerIndicatorView用于无限个tab的需求
2.优化了FixedIndicatorView的体验

compile 'com.shizhefei:ViewPagerIndicator:1.0.7'