当前位置:网站首页>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;
// }
//}
//==========================
边栏推荐
- 智慧物流平台:让海外仓更聪明
- 第3章业务功能开发(用户访问项目)
- Flask搭建api服务-生成API文档
- The computer cannot add a domain, and the Ping domain name is displayed as the public IP. What is the problem? How to solve it?
- 第二十四届中国科协湖南组委会调研课题组一行莅临麒麟信安调研考察
- 百度地图自定义样式向右拖拽导致全球地图经度0度无法正常显示
- SlashData开发者工具榜首等你而定!!!
- L1-027 出租(Lua)
- 赋能智慧电力建设 | 麒麟信安高可用集群管理系统,保障用户关键业务连续性
- 麒麟信安操作系统衍生产品解决方案 | 存储多路径管理系统,有效提高数据传输可靠性
猜你喜欢
How to choose the appropriate automated testing tools?
Sator推出Web3游戏“Satorspace” ,并上线Huobi
状态模式 - Unity(有限状态机)
redis主从、哨兵主备切换搭建一步一步图解实现
Leetcode brush questions day49
第3章业务功能开发(安全退出)
Mrs offline data analysis: process OBS data through Flink job
第3章业务功能开发(实现记住账号密码)
User defined view essential knowledge, Android R & D post must ask 30+ advanced interview questions
The top of slashdata developer tool is up to you!!!
随机推荐
Sator a lancé le jeu web 3 "satorspace" et a lancé huobi
Proxmox VE重装后,如何无损挂载原有的数据盘?
PLC:自动纠正数据集噪声,来洗洗数据集吧 | ICLR 2021 Spotlight
【可信计算】第十一次课:TPM密码资源管理(三) NV索引与PCR
centos7安装mysql笔记
【饭谈】那些看似为公司着想,实际却很自私的故事 (一:造轮子)
【分布式理论】(二)分布式存储
Is AI more fair than people in the distribution of wealth? Research on multiplayer game from deepmind
跟奥巴马一起画方块(Lua)
本周小贴士#141:注意隐式转换到bool
TabHOST 选项卡的功能和用法
【饭谈】Web3.0到来后,测试人员该何去何从?(十条预言和建议)
The top of slashdata developer tool is up to you!!!
从DevOps到MLOps:IT工具怎样向AI工具进化?
The mail server is listed in the blacklist. How to unblock it quickly?
Establishment of solid development environment
Flask build API service SQL configuration file
redis主从、哨兵主备切换搭建一步一步图解实现
麒麟信安加入宁夏商用密码协会
本周小贴士#136:无序容器