当前位置:网站首页>Show progress bar above window
Show progress bar above window
2022-07-07 17:36:00 【XLMN】
Progress bar not used progressBar Components , Directly by the activity Method start up
There are two steps to display the progress bar on the window
1. call activity Of requeswindowfeatrue Method to set the style of the progress bar
2、 call activity Of setprogressbarVisibility(boolean) and setprogressbarindeterminte visibility(boolean) Method to control the display and hiding of the progress bar
//public class MainActivity extends Activity {
// Button bt1, bt2;
// int time;
//
// @Override
// protected void onCreate(Bundle savedInstanceState) {
// // TODO Auto-generated method stub
// super.onCreate(savedInstanceState);
//
// // Set window features : Enable progress bar showing progress
// requestWindowFeature(Window.FEATURE_PROGRESS);
// // Set window features : Enable progress bars that do not show progress
// requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
// setContentView(R.layout.jindu);
// bt1 = (Button) findViewById(R.id.button1);
// bt2 = (Button) findViewById(R.id.button2);
// // by button Set event listening
// bt1.setOnClickListener(new OnClickListener() {
//
// @Override
// public void onClick(View arg0) {
// // TODO Auto-generated method stub
// // Show progress bar without progress
// setProgressBarIndeterminateVisibility(true);
// // Show progress bar with progress
// setProgressBarVisibility(true);
// // Set the progress bar's progress
// // The maximum progress of the display bar is 10000, If it is a control, you can set the maximum value by yourself
//
// new Thread() {
// public void run() {
// while (time < 100) {
//
// setProgress(times() * 100);
// }
// };
// }.start();
//
// }
// });
//
// // Set hidden progress bar
// bt2.setOnClickListener(new OnClickListener() {
//
// @Override
// public void onClick(View arg0) {
// // TODO Auto-generated method stub
// // Hide the progress bar without progress
// setProgressBarIndeterminateVisibility(false);
// // Hide the progress bar with progress
// setProgressBarVisibility(false);
//
// }
// });
//
// }
//
// public int times() {
// time++;
// try {
// Thread.sleep(100);
// } catch (InterruptedException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// return time;
// }
//}
//==========================
边栏推荐
- notification是显示在手机状态栏的通知
- [fan Tan] those stories that seem to be thinking of the company but are actually very selfish (I: building wheels)
- Proxmox VE重装后,如何无损挂载原有的数据盘?
- How to mount the original data disk without damage after the reinstallation of proxmox ve?
- L1-019 谁先倒(Lua)
- 防火墙系统崩溃、文件丢失的修复方法,材料成本0元
- 请将磁盘插入“U盘(H)“的情况&无法访问 磁盘结构损坏且无法读取
- VSCode关于C语言的3个配置文件
- NeRF:DeepFake的最终替代者?
- Flask搭建api服务-生成API文档
猜你喜欢
[Seaborn] combination chart: facetgrid, jointgrid, pairgrid
第3章业务功能开发(用户登录)
Biped robot controlled by Arduino
A tour of grpc:03 - proto serialization / deserialization
Is AI more fair than people in the distribution of wealth? Research on multiplayer game from deepmind
企业即时通讯软件是什么?它有哪些优势呢?
Sator a lancé le jeu web 3 "satorspace" et a lancé huobi
麒麟信安加入宁夏商用密码协会
【网络攻防原理与技术】第6章:特洛伊木马
管理VDI的几个最佳实践
随机推荐
toast会在程序界面上显示一个简单的提示信息
本周小贴士#141:注意隐式转换到bool
专精特新软件开发类企业实力指数发布,麒麟信安荣誉登榜
From Devops to mlops: how do it tools evolve to AI tools?
NeRF:DeepFake的最终替代者?
麒麟信安云平台全新升级!
Siggraph 2022 best technical paper award comes out! Chen Baoquan team of Peking University was nominated for honorary nomination
策略模式 - Unity
阿富汗临时政府安全部队对极端组织“伊斯兰国”一处藏匿点展开军事行动
【可信计算】第十二次课:TPM授权与会话
麒麟信安中标国网新一代调度项目!
Sator a lancé le jeu web 3 "satorspace" et a lancé huobi
MySQL usage notes 1
请将磁盘插入“U盘(H)“的情况&无法访问 磁盘结构损坏且无法读取
99%的人都不知道|私有化部署还永久免费的即时通讯软件!
第2章搭建CRM项目开发环境(搭建开发环境)
Biped robot controlled by Arduino
LeetCode1051(C#)
【网络攻防原理与技术】第4章:网络扫描技术
第3章业务功能开发(实现记住账号密码)