【问题标题】:How to automatically reload a screen(form) after a given period of inactivity in codenameone如何在代号一个给定的不活动时间后自动重新加载屏幕(表单)
【发布时间】:2016-07-27 15:11:36
【问题描述】:

如果页面在给定时间段内没有任何活动,我如何自动重新加载屏幕(表单)?在代号中

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    UITimer 可用于调度任务。

        UITimer timer = new UITimer(new Runnable() {
    
            @Override
            public void run() {
            ...
            }
        });
        timer.schedule(1000, false, Display.getInstance().getCurrent());
    

    【讨论】:

    • thanks.it 工作。但我想在特定的时间间隔将文本设置为 textfileld。当我将文本设置为文本字段时它给出错误
    猜你喜欢
    • 2011-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多