十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
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(); } }); } }