getDefaultActionModeHideDuration ( )源码实例Demo

android.view.ViewConfiguration#getDefaultActionModeHideDuration ( )源码实例Demo

下面列出了android.view.ViewConfiguration#getDefaultActionModeHideDuration ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Telegram-FOSS   文件: FloatingActionMode.java
@Override
public void hide(long duration) {
    if (duration == ActionMode.DEFAULT_HIDE_DURATION) {
        duration = ViewConfiguration.getDefaultActionModeHideDuration();
    }
    duration = Math.min(MAX_HIDE_DURATION, duration);
    mOriginatingView.removeCallbacks(mHideOff);
    if (duration <= 0) {
        mHideOff.run();
    } else {
        mFloatingToolbarVisibilityHelper.setHideRequested(true);
        mFloatingToolbarVisibilityHelper.updateToolbarVisibility();
        mOriginatingView.postDelayed(mHideOff, duration);
    }
}
 
源代码2 项目: Telegram   文件: FloatingActionMode.java
@Override
public void hide(long duration) {
    if (duration == ActionMode.DEFAULT_HIDE_DURATION) {
        duration = ViewConfiguration.getDefaultActionModeHideDuration();
    }
    duration = Math.min(MAX_HIDE_DURATION, duration);
    mOriginatingView.removeCallbacks(mHideOff);
    if (duration <= 0) {
        mHideOff.run();
    } else {
        mFloatingToolbarVisibilityHelper.setHideRequested(true);
        mFloatingToolbarVisibilityHelper.updateToolbarVisibility();
        mOriginatingView.postDelayed(mHideOff, duration);
    }
}
 
源代码3 项目: cronet   文件: ApiHelperForM.java
public static long getDefaultActionModeHideDuration() {
    return ViewConfiguration.getDefaultActionModeHideDuration();
}
 
源代码4 项目: 365browser   文件: SelectionPopupController.java
private long getDefaultHideDuration() {
    if (supportsFloatingActionMode()) {
        return ViewConfiguration.getDefaultActionModeHideDuration();
    }
    return 2000;
}