我想在listview中的自定义对话框中添加进度条。我的对话框是
dialog = new Dialog(RegestrationActivity.this);
dialog.setContentView(R.layout.dialog_qulification);
dialog.setTitle("State");
dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.MATCH_PARENT);
ListViewQualification = (ListView)dialog.findViewById(R.id.ListViewQualification);
ProgressBarStateQuali = (ProgressBar)dialog.findViewById(R.id.ProgressBarStateQuali);
ProgressBarStateQuali.setVisibility(View.VISIBLE);
ListViewQualification.setVisibility(View.GONE);
ProgressBarStateQuali.setVisibility(View.GONE);
ListViewQualification.setAdapter(adapterState);
ListViewQualification.setVisibility(View.VISIBLE);
dialog.show();
但它不起作用
答案 0 :(得分:2)
您已将可见性设置为进度条消失,将其删除它将起作用:
ProgressBarStateQuali.setVisibility(View.GONE);