当前位置:网站首页>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;
// }
//}
//==========================
边栏推荐
猜你喜欢

VSCode关于C语言的3个配置文件

科普达人丨一文弄懂什么是云计算?

Biped robot controlled by Arduino

【信息安全法律法规】复习篇

Leetcode brush questions day49

serachview的功能和用法

【网络攻防原理与技术】第1章:绪论

麒麟信安云平台全新升级!

第3章业务功能开发(用户访问项目)

Skimage learning (3) -- adapt the gray filter to RGB images, separate colors by immunohistochemical staining, and filter the maximum value of the region
随机推荐
Solidity 开发环境搭建
L1-027 出租(Lua)
国内首创!Todesk将RTC技术融入远程桌面,画质更清晰操作更流畅
第二十四届中国科协湖南组委会调研课题组一行莅临麒麟信安调研考察
防火墙系统崩溃、文件丢失的修复方法,材料成本0元
管理VDI的几个最佳实践
Flask搭建api服务-生成API文档
Linux 安装mysql8.X超详细图文教程
本周小贴士#134:make_unique与私有构造函数
[source code interpretation] | source code interpretation of livelistenerbus
跟奥巴马一起画方块(Lua)
Flash build API Service - generate API documents
With the latest Alibaba P7 technology system, mom doesn't have to worry about me looking for a job anymore
Enum + Validation 的个人最佳实践 demo 分享
第3章业务功能开发(用户访问项目)
【TPM2.0原理及应用指南】 9、10、11章
From Devops to mlops: how do it tools evolve to AI tools?
notification是显示在手机状态栏的通知
责任链模式 - Unity
【信息安全法律法規】複習篇