当前位置:网站首页>【HarmonyOS】【ARK UI】HarmonyOS ets语言怎么实现双击返回键退出
【HarmonyOS】【ARK UI】HarmonyOS ets语言怎么实现双击返回键退出
2022-07-30 09:56:00 【51CTO】
参考资料
【Harmony OS】【ARK UI】Date 基本操作
弹窗
代码运行
思路:
定义一个全局变量,判断点击时间与上一次点击时间差,若大于2秒则提示‘再按一次退出程序’字样,小于2秒退出应用,代码如下

运行效果

欲了解更多更全技术文章,欢迎访问 https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh
边栏推荐
- Nacos configuration in the project of battle
- [Qualcomm][Network] 网络拨号失败和netmgrd服务分析
- A near-perfect Unity full-platform hot update solution
- Security Thought Project Summary
- If someone asks you about distributed transactions again, throw this to him
- 死锁的理解
- Day113.尚医通:微信登录二维码、登录回调接口
- CVTE校招笔试题+知识点总结
- Re20:读论文的先例:普通法的信息理论分析
- New in GNOME: Warn users when Secure Boot is disabled
猜你喜欢

新一代开源免费的终端工具,太酷了

Domino Server SSL Certificate Installation Guide

Re18:读论文 GCI Everything Has a Cause: Leveraging Causal Inference in Legal Text Analysis

再有人问你分布式事务,把这篇扔给他

Flink_CDC搭建及简单使用

Do you really understand the 5 basic data structures of Redis?
![[Deep Learning] (Problem Record) <What do I get by calculating the gradient of a variable> - Linear Regression - Small Batch Stochastic Gradient Descent](/img/28/834aac16859fd26ab69de30f5fed55.png)
[Deep Learning] (Problem Record)
- Linear Regression - Small Batch Stochastic Gradient Descent 
MFCC to audio, the effect should not be too funny >V

Re18: Read the paper GCI Everything Has a Cause: Leveraging Causal Inference in Legal Text Analysis

Day113.尚医通:微信登录二维码、登录回调接口
随机推荐
debian10安装djando
线程池方式开启线程--submit()和execute()的区别
Re19:读论文 Paragraph-level Rationale Extraction through Regularization: A case study on European Court
4、yolov5-6.0 ERROR: AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 解决方案
mysql安装教程【安装版】
Flask's routing (app.route) detailed
Beijing suddenly announced big news in the Metaverse
Shell system learning function
Security Thought Project Summary
Paper reading: SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
Flink_CDC搭建及简单使用
线上靶机prompt.ml
【C和指针第七章】可变参数列表
Soft test system architects introductory tutorial | system operation and software maintenance
Adaptive Control - Simulation Experiment 1 Designing Adaptive Laws Using Lyapunov's Stability Theory
nacos实战项目中的配置
Mysterious APT Attack
数据库脏读、不可重复读、幻读以及对应的隔离级别
606. Create a string from a binary tree (video explanation!!!)
spark udf 接受并处理 null值.