0
我想顯示一個顯示計數器(時間計時器)的警報對話框,10秒鐘後會自動消失。android如何顯示特定時間的對話框
我:
builder = new AlertDialog.Builder(this);
builder.setTitle(title);
builder.setMessage(msg);
final EditText input = new EditText(this);
builder.setView(input);
runOnUiThread(new Runnable() {
@Override
public void run() {
builder.setMessage("ELEOS");
}
});
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dismissDialog(id);
}
});
return builder.create();
簡單地創建對話框。