From be152a79ceb7b7219f1d0ffbefc2731a8289c0d7 Mon Sep 17 00:00:00 2001 From: hackware1993 Date: Thu, 25 Aug 2016 00:58:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4EasyViewPagerDelegate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../magicindicator/EasyViewPagerDelegate.java | 75 ------------------- 1 file changed, 75 deletions(-) delete mode 100644 magicindicator/src/main/java/net/lucode/hackware/magicindicator/EasyViewPagerDelegate.java diff --git a/magicindicator/src/main/java/net/lucode/hackware/magicindicator/EasyViewPagerDelegate.java b/magicindicator/src/main/java/net/lucode/hackware/magicindicator/EasyViewPagerDelegate.java deleted file mode 100644 index 5ee04642..00000000 --- a/magicindicator/src/main/java/net/lucode/hackware/magicindicator/EasyViewPagerDelegate.java +++ /dev/null @@ -1,75 +0,0 @@ -package net.lucode.hackware.magicindicator; - -import android.support.v4.view.ViewPager; - -import net.lucode.hackware.magicindicator.abs.AbsDelegate; -import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator; - -/** - * Created by hackware on 2016/8/18. - */ - -public class EasyViewPagerDelegate extends AbsDelegate { - private MagicIndicator mMagicIndicator; - private ViewPager mViewPager; - private CommonNavigator mCommonNavigator; - private int mSelectedColor; - private int mNormalColor; - private int mLineColor; - private float mLineHeight; - - private EasyViewPagerDelegate(MagicIndicator magicIndicator, ViewPager viewPager) { - mMagicIndicator = magicIndicator; - mViewPager = viewPager; - } - - public static EasyViewPagerDelegate with(MagicIndicator magicIndicator, ViewPager viewPager) { - return new EasyViewPagerDelegate(magicIndicator, viewPager); - } - - /** - * selectedColor is like 0xffffff,not color resId - * - * @param selectedColor - * @return - */ - public EasyViewPagerDelegate selectedColor(int selectedColor) { - mSelectedColor = selectedColor; - return this; - } - - public EasyViewPagerDelegate normalColor(int normalColor) { - mNormalColor = normalColor; - return this; - } - - public EasyViewPagerDelegate lineColor(int lineColor) { - mLineColor = lineColor; - return this; - } - - public void bind() { - mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() { - - @Override - public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - mMagicIndicator.onPageScrolled(position, positionOffset, positionOffsetPixels); - } - - @Override - public void onPageSelected(int position) { - mMagicIndicator.onPageSelected(position); - } - - @Override - public void onPageScrollStateChanged(int state) { - mMagicIndicator.onPageScrollStateChanged(state); - } - }); - } - - @Override - public void delegate() { - // TODO 此类暂未完成 - } -}