当前位置: 首页>>代码示例>>Java>>正文


Java IPagerTitleView类代码示例

本文整理汇总了Java中net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView的典型用法代码示例。如果您正苦于以下问题:Java IPagerTitleView类的具体用法?Java IPagerTitleView怎么用?Java IPagerTitleView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPagerTitleView类属于net.lucode.hackware.magicindicator.buildins.commonnavigator.abs包,在下文中一共展示了IPagerTitleView类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEnter

import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
@Override
public void onEnter(int index, int totalCount, float enterPercent, boolean leftToRight) {
    if (mTitleContainer == null) {
        return;
    }
    View v = mTitleContainer.getChildAt(index);
    if (v instanceof IPagerTitleView) {
        ((IPagerTitleView) v).onEnter(index, totalCount, enterPercent, leftToRight);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:CommonNavigator.java

示例2: onLeave

import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
@Override
public void onLeave(int index, int totalCount, float leavePercent, boolean leftToRight) {
    if (mTitleContainer == null) {
        return;
    }
    View v = mTitleContainer.getChildAt(index);
    if (v instanceof IPagerTitleView) {
        ((IPagerTitleView) v).onLeave(index, totalCount, leavePercent, leftToRight);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:CommonNavigator.java

示例3: onSelected

import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
@Override
public void onSelected(int index, int totalCount) {
    if (mTitleContainer == null) {
        return;
    }
    View v = mTitleContainer.getChildAt(index);
    if (v instanceof IPagerTitleView) {
        ((IPagerTitleView) v).onSelected(index, totalCount);
    }
    if (!mAdjustMode && !mFollowTouch && mScrollView != null && mPositionDataList.size() > 0) {
        int currentIndex = Math.min(mPositionDataList.size() - 1, index);
        PositionData current = mPositionDataList.get(currentIndex);
        if (mEnablePivotScroll) {
            float scrollTo = current.horizontalCenter() - mScrollView.getWidth() * mScrollPivotX;
            if (mSmoothScroll) {
                mScrollView.smoothScrollTo((int) (scrollTo), 0);
            } else {
                mScrollView.scrollTo((int) (scrollTo), 0);
            }
        } else {
            // 如果当前项被部分遮挡,则滚动显示完全
            if (mScrollView.getScrollX() > current.mLeft) {
                if (mSmoothScroll) {
                    mScrollView.smoothScrollTo(current.mLeft, 0);
                } else {
                    mScrollView.scrollTo(current.mLeft, 0);
                }
            } else if (mScrollView.getScrollX() + getWidth() < current.mRight) {
                if (mSmoothScroll) {
                    mScrollView.smoothScrollTo(current.mRight - getWidth(), 0);
                } else {
                    mScrollView.scrollTo(current.mRight - getWidth(), 0);
                }
            }
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:38,代码来源:CommonNavigator.java

示例4: onDeselected

import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
@Override
public void onDeselected(int index, int totalCount) {
    if (mTitleContainer == null) {
        return;
    }
    View v = mTitleContainer.getChildAt(index);
    if (v instanceof IPagerTitleView) {
        ((IPagerTitleView) v).onDeselected(index, totalCount);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:CommonNavigator.java

示例5: getPagerTitleView

import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
public IPagerTitleView getPagerTitleView(int index) {
    if (mTitleContainer == null) {
        return null;
    }
    return (IPagerTitleView) mTitleContainer.getChildAt(index);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:CommonNavigator.java

示例6: getInnerPagerTitleView

import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
public IPagerTitleView getInnerPagerTitleView() {
    return mInnerPagerTitleView;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:BadgePagerTitleView.java


注:本文中的net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。