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


Java PtrCLog.d方法代码示例

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


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

示例1: notifyUILoadComplete

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
private void notifyUILoadComplete(boolean ignoreHook) {
    /**
     * After hook operation is done, {@link #notifyUIRefreshComplete} will be call in resume action to ignore hook.
     */
    if (mPtrIndicator.hasLeftBottomPosition() && !ignoreHook && mLoadCompleteHook != null) {//hook
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "notifyUIRefreshComplete mRefreshCompleteHook run.");
        }
        mLoadCompleteHook.takeOver();
        return;
    }
    if (mPtrUIFooterHolder.hasHandler()) {
        if (DEBUG) {
            PtrCLog.i(LOG_TAG, "PtrUIHeader: onUIRefreshComplete");
        }
        mPtrUIFooterHolder.onUIRefreshComplete(this);
    }
    mPtrIndicator.onUIRefreshComplete();
    tryScrollBackToBottomAfterComplete();//// TODO: 2017/9/4 进行加载更多展示
    tryToNotifyReset(false);
}
 
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:22,代码来源:PtrFrameLayout.java

示例2: notifyUIRefreshComplete

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
/**
 * Do real refresh work. If there is a hook, execute the hook first.
 *
 * @param ignoreHook
 */
private void notifyUIRefreshComplete(boolean ignoreHook) {
    /**
     * After hook operation is done, {@link #notifyUIRefreshComplete} will be call in resume action to ignore hook.
     */
    if (mPtrIndicator.hasLeftStartPosition() && !ignoreHook && mRefreshCompleteHook != null) {
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "notifyUIRefreshComplete mRefreshCompleteHook run.");
        }

        mRefreshCompleteHook.takeOver();
        return;
    }
    if (mPtrUIHandlerHolder.hasHandler()) {
        if (DEBUG) {
            PtrCLog.i(LOG_TAG, "PtrUIHandler: onUIRefreshComplete");
        }
        mPtrUIHandlerHolder.onUIRefreshComplete(this, mPtrIndicator.isHeader());
    }
    mPtrIndicator.onUIRefreshComplete();
    tryScrollBackToTopAfterComplete();
    tryToNotifyReset();
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:28,代码来源:PtrFrameLayout.java

示例3: performRefreshComplete

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
/**
 * Do refresh complete work when time elapsed is greater than {@link #mLoadingMinTime}
 */
private void performRefreshComplete() {
    mStatus = PTR_STATUS_COMPLETE;

    // if is auto refresh do nothing, wait scroller stop
    if (mScrollChecker.mIsRunning && isAutoRefresh()) {
        // do nothing
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "performRefreshComplete do nothing, scrolling: %s, auto refresh: %s",
                    mScrollChecker.mIsRunning, mFlag);
        }
        return;
    }

    notifyUIRefreshComplete(false);
}
 
开发者ID:yinyiliang,项目名称:RabbitCloud,代码行数:19,代码来源:PtrFrameLayout.java

示例4: refreshComplete

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
/**
 * Call this when data is loaded.
 * The UI will perform complete at once or after a delay, depends on the time elapsed is greater then {@link #mLoadingMinTime} or not.
 */
final public void refreshComplete() {
    if (DEBUG) {
        PtrCLog.i(LOG_TAG, "refreshComplete");
    }

    if (mRefreshCompleteHook != null) {
        mRefreshCompleteHook.reset();
    }

    int delay = (int) (mLoadingMinTime - (System.currentTimeMillis() - mLoadingStartTime));
    if (delay <= 0) {
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "performRefreshComplete at once");
        }
        performRefreshComplete();
    } else {
        postDelayed(mPerformRefreshCompleteDelay, delay);
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "performRefreshComplete after delay: %s", delay);
        }
    }
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:27,代码来源:PtrFrameLayout.java

示例5: tryToScrollTo

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
public void tryToScrollTo(int to, int duration) {
    if (mPtrIndicator.isAlreadyHere(to)) {
        return;
    }
    mStart = mPtrIndicator.getCurrentPosY();
    mTo = to;
    int distance = to - mStart;
    if (DEBUG) {
        PtrCLog.d(LOG_TAG, "tryToScrollTo: start: %s, distance:%s, to:%s", mStart, distance, to);
    }
    removeCallbacks(this);

    mLastFlingY = 0;

    // fix #47: Scroller should be reused, https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh/issues/47
    if (!mScroller.isFinished()) {
        mScroller.forceFinished(true);
    }
    mScroller.startScroll(0, 0, 0, distance, duration);
    post(this);
    mIsRunning = true;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:23,代码来源:PtrFrameLayout.java

示例6: tryToScrollTo

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
public void tryToScrollTo(int to, int duration, boolean isPullToLoad) {
    this.isPullToLoad = isPullToLoad;//判断上拉与否
    if (mPtrIndicator.isAlreadyHere(to)) {
        PtrIndicator.isPullFooter = false;
        PtrIndicator.isPullHeader = false;
        mStatus = PTR_STATUS_INIT;
        return;
    }
    mStart = mPtrIndicator.getCurrentPosY();
    mTo = to;
    int distance = to - mStart;
    if (DEBUG) {
        PtrCLog.d(LOG_TAG, "tryToScrollTo: start: %s, distance:%s, to:%s", mStart, distance, to);
    }
    removeCallbacks(this);
    mLastFlingY = 0;

    // fix #47: Scroller should be reused, https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh/issues/47
    if (!mScroller.isFinished()) {
        mScroller.forceFinished(true);
    }
    mScroller.startScroll(0, 0, 0, distance, duration);
    post(this);
    mIsRunning = true;
}
 
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:26,代码来源:PtrFrameLayout.java

示例7: notifyUIRefreshComplete

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
/**
 * Do real refresh work. If there is a hook, execute the hook first.
 *
 * @param ignoreHook
 */
private void notifyUIRefreshComplete(boolean ignoreHook) {
    /**
     * After hook operation is done, {@link #notifyUIRefreshComplete} will be call in resume action to ignore hook.
     */
    if (mPtrIndicator.hasLeftStartPosition() && !ignoreHook && mRefreshCompleteHook != null) {
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "notifyUIRefreshComplete mRefreshCompleteHook run.");
        }

        mRefreshCompleteHook.takeOver();
        return;
    }
    if (mPtrUIHeaderHolder.hasHandler()) {
        if (DEBUG) {
            PtrCLog.i(LOG_TAG, "PtrUIHeader: onUIRefreshComplete");
        }
        mPtrUIHeaderHolder.onUIRefreshComplete(this);
    }
    mPtrIndicator.onUIRefreshComplete();
    tryScrollBackToTopAfterComplete();
    tryToNotifyReset(true);
}
 
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:28,代码来源:PtrFrameLayout.java

示例8: tryToScrollTo

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
public void tryToScrollTo(int to, int duration) {
    if (mPtrIndicator.isAlreadyHere(to)) {
        return;
    }
    mStart = mPtrIndicator.getCurrentPosY();
    mTo = to;
    int distance = to - mStart;
    if (DEBUG) {
        PtrCLog.d(LOG_TAG, "tryToScrollTo: start: %s, distance:%s, to:%s", mStart, distance, to);
    }
    removeCallbacks(this);

    mLastFlingY = 0;

    // fix #47: Scroller should be reused, https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh/issues/47
    if (!mScroller.isFinished()) {
        mScroller.forceFinished(true);
    }
    if (duration > 0) {
        mScroller.startScroll(0, 0, 0, distance, duration);
        post(this);
        mIsRunning = true;
    } else {
        if (mPtrIndicator.isHeader()) {
            moveHeaderPos(distance);
        } else {
            moveFooterPos(-distance);
        }
        mIsRunning = false;
    }
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:32,代码来源:PtrFrameLayout.java

示例9: sendCancelEvent

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
private void sendCancelEvent() {
    if (DEBUG) {
        PtrCLog.d(LOG_TAG, "send cancel event");
    }
    // The ScrollChecker will update position and lead to send cancel event when mLastMoveEvent is null.
    // fix #104, #80, #92
    if (mLastMoveEvent == null) {
        return;
    }
    MotionEvent last = mLastMoveEvent;
    MotionEvent e = MotionEvent.obtain(last.getDownTime(), last.getEventTime() + ViewConfiguration.getLongPressTimeout(), MotionEvent.ACTION_CANCEL, last.getX(), last.getY(), last.getMetaState());
    dispatchTouchEventSupper(e);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:PtrFrameLayout.java

示例10: sendDownEvent

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
private void sendDownEvent() {
    if (DEBUG) {
        PtrCLog.d(LOG_TAG, "send down event");
    }
    final MotionEvent last = mLastMoveEvent;
    MotionEvent e = MotionEvent.obtain(last.getDownTime(), last.getEventTime(), MotionEvent.ACTION_DOWN, last.getX(), last.getY(), last.getMetaState());
    dispatchTouchEventSupper(e);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:PtrFrameLayout.java

示例11: onPtrScrollAbort

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
protected void onPtrScrollAbort() {
    if (mPtrIndicator.hasLeftStartPosition() && isAutoRefresh()) {
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "call onRelease after scroll abort");
        }
        onRelease(true);
    }
}
 
开发者ID:tony-Shx,项目名称:Swface,代码行数:9,代码来源:PtrFrameLayout.java

示例12: onPtrScrollFinish

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
protected void onPtrScrollFinish() {
    if (mPtrIndicator.hasLeftStartPosition() && isAutoRefresh()) {
        if (DEBUG) {
            PtrCLog.d(LOG_TAG, "call onRelease after scroll finish");
        }
        onRelease(true);
    }
}
 
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:9,代码来源:PtrFrameLayout.java

示例13: dispatchTouchEvent

import in.srain.cube.views.ptr.util.PtrCLog; //导入方法依赖的package包/类
@Override
public boolean dispatchTouchEvent(MotionEvent e) {
    if (!isEnabled() || mContent == null || mHeaderView == null) {
        return dispatchTouchEventSupper(e);
    }
    int action = e.getAction();
    switch (action) {
        case MotionEvent.ACTION_UP:
        case MotionEvent.ACTION_CANCEL:
            mPtrIndicator.onRelease();
            if (mPtrIndicator.hasLeftStartPosition()) {
                if (DEBUG) {
                    PtrCLog.d(LOG_TAG, "call onRelease when user release");
                }
                onRelease(false);
                if (mPtrIndicator.hasMovedAfterPressedDown()) {
                    sendCancelEvent();
                    return true;
                }
                return dispatchTouchEventSupper(e);
            } else {
                return dispatchTouchEventSupper(e);
            }

        case MotionEvent.ACTION_DOWN:
            mHasSendCancelEvent = false;
            mPtrIndicator.onPressDown(e.getX(), e.getY());

            mScrollChecker.abortIfWorking();

            mPreventForHorizontal = false;
            // The cancel event will be sent once the position is moved.
            // So let the event pass to children.
            // fix #93, #102
            dispatchTouchEventSupper(e);
            return true;

        case MotionEvent.ACTION_MOVE:
            mLastMoveEvent = e;
            mPtrIndicator.onMove(e.getX(), e.getY());
            float offsetX = mPtrIndicator.getOffsetX();
            float offsetY = mPtrIndicator.getOffsetY();

            if (mDisableWhenHorizontalMove && !mPreventForHorizontal && (Math.abs(offsetX) > mPagingTouchSlop && Math.abs(offsetX) > Math.abs(offsetY))) {
                if (mPtrIndicator.isInStartPosition()) {
                    mPreventForHorizontal = true;
                }
            }
            if (mPreventForHorizontal) {
                return dispatchTouchEventSupper(e);
            }

            boolean moveDown = offsetY > 0;
            boolean moveUp = !moveDown;
            boolean canMoveUp = mPtrIndicator.hasLeftStartPosition();

            if (DEBUG) {
                boolean canMoveDown = mPtrHandler != null && mPtrHandler.checkCanDoRefresh(this, mContent, mHeaderView);
                PtrCLog.v(LOG_TAG, "ACTION_MOVE: offsetY:%s, currentPos: %s, moveUp: %s, canMoveUp: %s, moveDown: %s: canMoveDown: %s", offsetY, mPtrIndicator.getCurrentPosY(), moveUp, canMoveUp, moveDown, canMoveDown);
            }

            // disable move when header not reach top
            if (moveDown && mPtrHandler != null && !mPtrHandler.checkCanDoRefresh(this, mContent, mHeaderView)) {
                return dispatchTouchEventSupper(e);
            }

            if ((moveUp && canMoveUp) || moveDown) {
                movePos(offsetY);
                return true;
            }
    }
    return dispatchTouchEventSupper(e);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:74,代码来源:PtrFrameLayout.java


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