重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

ProgressDialog简单使用记录




    
package com.example.liang.at;

import android.app.ProgressDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class pa extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pa);
        Button bt =(Button) findViewById(R.id.showProgress);
        bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ProgressDialog progressDialog = new ProgressDialog(v.getContext());
                progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
                progressDialog.setIcon(R.drawable.loading);
                progressDialog.setMessage("Loading...");
                progressDialog.setCancelable(false);
                progressDialog.show();
            }
        });
    }
}

当前题目:ProgressDialog简单使用记录
浏览路径:http://cqcxhl.com/article/jiopjd.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP