1
我正在與紡紗廠合作,並希望將窗口的背景顏色從黑色變爲白色。 下面是進度對話框代碼:如何更改進度對話框的背景顏色?
if (countProgress > 0) {
countProgress += 1;
return;
}
final ProgressDialog progressDialog = new ProgressDialog(activity, DialogFragment.STYLE_NO_TITLE);
progressDialog.setIndeterminateDrawable(activity.getResources().getDrawable(R.drawable.progress));
progressDialog.setMessage(msg);
progressDialog.setCancelable(false);
progressDialog.setCanceledOnTouchOutside(false);
stackProgressDialog.push(progressDialog);
countProgress = 1;
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
progressDialog.show();
}
});
,這裏是被拉伸的xml:
<?xml version="1.0" encoding="utf-8"?>
rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/logo_only_64dp"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="0"
android:toDegrees="360"
android:repeatCount="infinite"/>
謝謝,這幫助我解決了我的問題! – GAD
不客氣,你能接受答案嗎? –