我有一个自定义进度圈,这是代码:
import android.app.Dialog;
import android.content.Context;
public class CustomProgressDialog extends Dialog {
MaterialProgressBar progress1;
Context mContext;
CustomProgressDialog dialog;
public CustomProgressDialog(Context context) {
super(context);
this.mContext=context;
}
public CustomProgressDialog(Context context, int theme) {
super(context, theme);
}
public CustomProgressDialog show(CharSequence message) {
dialog = new CustomProgressDialog (mContext,R.style.ProgressDialog);
dialog.setContentView(R.layout.view_material_progress);
progress1 = (MaterialProgressBar) dialog.findViewById (R.id.progress1);
progress1.setColorSchemeResources(R.color.red,R.color.green,R.color.blue,R.color.orange);
dialog.setCancelable(true);
if(dialog!= null) {
dialog.show ();
}
return dialog;
}
public CustomProgressDialog dismiss(CharSequence message) {
if(dialog!=null) {
dialog.dismiss();
}
return dialog;
}
}
它会像下面的图像一样形成一个圆形进度条,我想让它变大,就像当前的双倍大小一样。
我该怎么办?