本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
}
}
}
示例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);
}
}
示例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);
}
示例6: getInnerPagerTitleView
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView; //导入依赖的package包/类
public IPagerTitleView getInnerPagerTitleView() {
return mInnerPagerTitleView;
}