zoukankan      html  css  js  c++  java
  • e807. 设置进程监听对话框的延迟弹出

    By default, the progress monitor delays for a short period before it is displayed. There are two properties that control when the dialog is displayed - - millisToPopup and millisToDecideToPopup. The progress monitor computes a time-to-completion based on the how fast the value changes. The dialog will not appear as long as the predicted time-to-completion is less than millisToPopup. millisToDecideToPopup determines a minimum time, since the progress monitor was created, before the dialog can appear.

    In summary, the dialog is shown only if it has been millisToDecideToPopup milliseconds after the progress monitor was created and the predicted time-to-completion is greater than millisToPopup.

        // Get delay based on time-to-completion
        int millisToPopup = pm.getMillisToPopup();                 // 2000
        
        // Get minimum delay
        int millisToDecideToPopup = pm.getMillisToDecideToPopup(); // 500
        
        // To make progress monitor popup immediately, set both to 0
        pm.setMillisToPopup(0);
        pm.setMillisToDecideToPopup(0);
    
    Related Examples
  • 相关阅读:
    iperf使用
    性能工具--vtune
    Android广告轮播图实现
    自定义控件学习——下拉刷新ListView
    JVM读书笔记
    自定义控件学习——仿qq侧滑栏
    初步使用RecyclerView实现瀑布流
    自定义Toast
    自定义对话框加状态选择器
    自定义组合控件
  • 原文地址:https://www.cnblogs.com/borter/p/9596182.html
Copyright © 2011-2022 走看看