alertDialog.Builder builder = new alertDialog.Builder(your_activity.this);builder.setTitle(!puzzle.isSolved() ? R.string.title_stats : stats.isNewBest() ? R.string.title_new_record : R.string.title_solved);builder.setMessage(msg);builder.setPositiveButton(R.string.label_ok, new DialogInterface.onClickListener() { public void onClick(DialogInterface dialog, int id) { Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("http://www..com")); Bundle b = new Bundle(); b.putBoolean("new_window", true); //sets new window intent.putExtras(b); startActivity(intent); }});builder.show();
试试这个
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)