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


Java Mode.showFooterLoadingLayout方法代码示例

本文整理汇总了Java中com.handmark.pulltorefresh.library.PullToRefreshBase.Mode.showFooterLoadingLayout方法的典型用法代码示例。如果您正苦于以下问题:Java Mode.showFooterLoadingLayout方法的具体用法?Java Mode.showFooterLoadingLayout怎么用?Java Mode.showFooterLoadingLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.handmark.pulltorefresh.library.PullToRefreshBase.Mode的用法示例。


在下文中一共展示了Mode.showFooterLoadingLayout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createLoadingLayoutProxy

import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode; //导入方法依赖的package包/类
protected LoadingLayoutProxy createLoadingLayoutProxy(boolean includeStart, boolean
        includeEnd) {
    LoadingLayoutProxy proxy = super.createLoadingLayoutProxy(includeStart, includeEnd);
    if (this.mListViewExtrasEnabled) {
        Mode mode = getMode();
        if (includeStart && mode.showHeaderLoadingLayout()) {
            proxy.addLayout(this.mHeaderLoadingView);
        }
        if (includeEnd && mode.showFooterLoadingLayout()) {
            proxy.addLayout(this.mFooterLoadingView);
        }
    }
    return proxy;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:15,代码来源:PullToRefreshListView.java

示例2: overScrollBy

import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode; //导入方法依赖的package包/类
public static void overScrollBy(PullToRefreshBase<?> view, int deltaX, int scrollX, int
        deltaY, int scrollY, int scrollRange, int fuzzyThreshold, float scaleFactor, boolean
        isTouchEvent) {
    int deltaValue;
    int scrollValue;
    int currentScrollValue;
    switch (view.getPullToRefreshScrollDirection()) {
        case HORIZONTAL:
            deltaValue = deltaX;
            scrollValue = scrollX;
            currentScrollValue = view.getScrollX();
            break;
        default:
            deltaValue = deltaY;
            scrollValue = scrollY;
            currentScrollValue = view.getScrollY();
            break;
    }
    if (view.isPullToRefreshOverScrollEnabled() && !view.isRefreshing()) {
        Mode mode = view.getMode();
        if (mode.permitsPullToRefresh() && !isTouchEvent && deltaValue != 0) {
            int newScrollValue = deltaValue + scrollValue;
            if (newScrollValue < 0 - fuzzyThreshold) {
                if (mode.showHeaderLoadingLayout()) {
                    if (currentScrollValue == 0) {
                        view.setState(State.OVERSCROLLING, new boolean[0]);
                    }
                    view.setHeaderScroll((int) (((float) (currentScrollValue +
                            newScrollValue)) * scaleFactor));
                }
            } else if (newScrollValue > scrollRange + fuzzyThreshold) {
                if (mode.showFooterLoadingLayout()) {
                    if (currentScrollValue == 0) {
                        view.setState(State.OVERSCROLLING, new boolean[0]);
                    }
                    view.setHeaderScroll((int) (((float) ((currentScrollValue +
                            newScrollValue) - scrollRange)) * scaleFactor));
                }
            } else if (Math.abs(newScrollValue) <= fuzzyThreshold || Math.abs(newScrollValue
                    - scrollRange) <= fuzzyThreshold) {
                view.setState(State.RESET, new boolean[0]);
            }
        } else if (isTouchEvent && State.OVERSCROLLING == view.getState()) {
            view.setState(State.RESET, new boolean[0]);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:48,代码来源:OverscrollHelper.java


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