• Android 下载进度对话框 ProgressDialog


        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
    
            button = (Button) findViewById(R.id.button);
            button.setOnClickListener(new View.OnClickListener() {
    
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
    
                    ProgressDialog dialog = new ProgressDialog(MainActivity.this);
                    dialog.setTitle("下载提示");
                    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
                    dialog.setProgress(50);
                    dialog.show();
                }
            });
        }

    image

  • 相关阅读:
    AGC 014 B
    AGC 012 D
    AGC 012 C
    python
    Linux
    Linux
    Linux
    Linux 之 光标消失隐藏术
    Linux
    python
  • 原文地址:https://www.cnblogs.com/zhangxuechao/p/11797779.html
Copyright © 2020-2023  润新知