1
我將動態消息成功添加到我的progressdialog.But時添加按鈕它不會按下按鈕請幫助我。如何動態添加按鈕進度對話框android?
private Handler progressHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
// process incoming messages here
switch (msg.what) {
case 0:
// update progress bar
progressDialog.setMessage("" + (String) msg.obj);
break;
case 1:
progressDialog.setMessage("" + (String) msg.obj);
finish();
break;
case 2:
Log.d(TAG,"in case 2.........");
// progressDialog.cancel();
progressDialog.setMessage("" + (String) msg.obj);
progressDialog.setButton("HOME", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// progressDialog.cancel();
finish();
}
});
break;
}
super.handleMessage(msg);
}
};
問候, Rajendar是
嘿ADIT,我有類似的需求。你能得到你想要的東西嗎?請分享您的代碼.. – Nepster 2014-06-17 12:45:59