更改ProgressDialog的样式

    xiaoxiao2023-05-27  4

    在创建ProgressDialog的时候需要引用系统的样式,引用不到com.Android.internal.R.style.Theme_Holo_Dialog_Alert,而是通过ProgressDialog.THEME_HOLO_LIGHT来引用系统自定义ProgressDialog样式。

    ProgressDialog dialog = new ProgressDialog(this, ProgressDialog.THEME_HOLO_LIGHT); dialog.setTitle("登录"); dialog.setMessage("正在登录,请稍后..."); // dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setCanceledOnTouchOutside(false); dialog.setCancelable(true); dialog.show();

    转载请注明原文地址: https://ju.6miu.com/read-1260738.html
    最新回复(0)