android开发:基础知识(增加ing)

1.AndroidManifest.xml文件解析:http://www.cnblogs.com/pilang/archive/2011/04/20/2022932.html

2.AlertDialog

Dialog alertDialog = new AlertDialog.Builder(this). 
                setTitle("对话框的标题"). 
                setMessage("对话框的内容"). 
                setIcon(R.drawable.icon). 
                create(); 
alertDialog.show(); 
AlertDialog.Builder创建对话框需要了解以下几个方法:
setTitle :为对话框设置标题
setIcon :为对话框设置图标
setMessage:为对话框设置内容
setView : 给对话框设置自定义样式
setItems :设置对话框要显示的一个list,一般用于显示几个命令时
setMultiChoiceItems :用来设置对话框显示一系列的复选框
setNeutralButton    :普通按钮

setPositiveButton   :给对话框添加"Yes"按钮
setNegativeButton :对话框添加"No"按钮
create : 创建对话框
show :显示对话框

注:AlertDialog.Builder ad=new AlertDialog.Builder(this);ad.setTitle("设置网络");

  

posted @ 2013-03-20 15:13  Uoolo  阅读(198)  评论(0编辑  收藏  举报