首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Android开发便签一:AlertDialog的使用

2012-08-27 
Android开发便签1:AlertDialog的使用Android如何产生的一个AlertDialog:AlertDialog.Builder alert new

Android开发便签1:AlertDialog的使用
Android如何产生的一个AlertDialog:

AlertDialog.Builder alert = new AlertDialog.Builder(this);alert.setTitle("");//设置标题alert.setMessage("AlertDialog");//设置显示的内容alert.setPositiveButton("", new DialogInterface.OnClickListener(){                           //处理点击事件public void onClick(DialogInterface arg0, int arg1){//点击按钮要做的事情......}});alert.create().show();

热点排行