Android 進度對話框 ProgressDialog

来源:https://www.cnblogs.com/zhangxuechao/archive/2019/11/05/11797776.html

protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button = (Button) fin... ...


    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

                // ProgressDialog.show(MainActivity.this, "提示", "正在載入,請稍後...");
                ProgressDialog dialog = new ProgressDialog(MainActivity.this);
                dialog.setTitle("提示");
                dialog.setMessage("正在載入,請稍後...");
                dialog.show();
            }
        });
    }

image


您的分享是我們最大的動力!

更多相關文章
  • @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button = (B ...
  • 完成共用參數的讀寫public class SharedPreference { private Context context; public SharedPreference(Context context) { // TODO Auto-generated constructor stub t... ...
  • 蘋果認可的標識符 Apple提供了各種API,以方便用戶識別各種用途: 通用標識符(UDID) 在iOS的早期,蘋果公司提供了一個uniqueIdentifier財產上UIDevice-親切地稱為udid (不要與UUID混淆)。雖然這樣的功能在今天看來是不可想象的,但該屬性一直存在到IOS 5,直 ...
  • https://developer.umeng.com/docs/66632/detail/66748#createappid ...
  • 版權聲明:本文為xing_star原創文章,轉載請註明出處! 本文同步自http://javaexception.com/archives/225 最近線上報錯,有個用戶連續crash了10次左右,查看了下堆棧信息,發現是提示com.android.camera.action.CROP這個Inten ...
一周排行
x