AsyncTaskの実行中に表示される進行状況サークル(以下のコード)を完全に非表示にし、進行状況ダイアログを表示したいと思います。問題は、透明な進行状況ダイアログを通して円が見えることです。誰かが助けることができますか?[進行状況]ダイアログの透明度を変更したくない...
new AsyncTask<String, Void, List<Product>>() {
private ProgressDialog dialog;
protected void onPreExecute() {
this.dialog = ProgressDialog.show(getActivity(), "Progress", "Retrieving products...", false, false);
}
protected void onPostExecute(List<Product> result) {
// populate the list
Context context = getSherlockActivity().getApplicationContext();
ArrayAdapter<Product> adapter = new ArrayAdapter<Product>(context, R.layout.productlist_item, result);
setListAdapter(adapter);
// dismiss the progress dialog
dialog.dismiss();
}
@Override
protected List<Product> doInBackground(String... params) {
// populate the database if required
try {
// get the data from the server
MyApplication.populateProductDatabase(false);
} catch (NotConnectedToInternetException e) {
exceptionMessage = "Unable to retrieve data. Internet connection unavailable.";
e.printStackTrace();
}
// get the records in the database
ProductDAO dao = new ProductDAO();
List<Product> result = dao.getProducts(params[0]);
return result;
}
}.execute(find);