首页 > 代码库 > 显示自动升级提醒对话框

显示自动升级提醒对话框

public void showUpdateDialog()
{
	AlertDialog.Builder builder = new Builder(this);
	builder.setTitle("升级提醒:");
	builder.setMessage(updateInfo.getDescription());

	builder.setPositiveButton("升级", new OnClickListener()
	{
		public void onClick(DialogInterface dialog, int which)
		{
			Log.i(TAG, updateInfo.getApkurl());
			downLoadApk();
		}
	});

	builder.setNegativeButton("下次", new OnClickListener()
	{
		public void onClick(DialogInterface dialog, int which)
		{
			loadMainUi();
		}
	});
	builder.show();
}