我有一個列表視圖與檢索與JSON項目列表,我想顯示項目點擊ProgressDialog。顯示ProgressDialog OnItemClick
listNews.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View v, int position,
long arg3) {
ProgressDialog dialog;
dialog = ProgressDialog.show(v.getContext(), "Please wait..", "Loading data", true);
dialog.setCancelable(false);
dialog.show();
News n = (News)listNews.getItemAtPosition(position);
Intent myIntent = new Intent(v.getContext(), SingleActivity.class);
myIntent.putExtra("actu_id", n.ID);
dialog.dismiss();
startActivityForResult(myIntent, 0);
}
});
ProgressDialog不顯示... 同樣的問題,當我在OnCreate中的SingleActivity.class
定義此progressDialog你能幫助我嗎?
對不起,我的英語...