2011年8月23日
摘要: 1、创建LayoutInflaterLayoutInflater li=LayoutInflater.from(this);2、填充布局View quakeDetailsView=li.inflate(R.layout.quake_details, null);3、创建AlertDialogAlertDialog.Builder quakeDialog=new AlertDialog.Builder(this); AlertDialog的构造函数都是protect的,android只提供了AlertDialog.Builder来构造AlertDialog4、设置AlertDialog自定义视图 阅读全文
posted @ 2011-08-23 17:20 陈孝勇 阅读(1275) 评论(0) 推荐(0) 编辑
摘要: LayoutInflater 一般来讲,我们用LayoutInflater做一件事:inflate。inflate这个方法总共有四种形式,目的都是把xml表述的layout转化为View。This class is used to instantiate layout XML file into its corresponding View objects. It is never be used directly -- use getLayoutInflater() or getSystemService(String)getLayoutInflater() or getSystemServ 阅读全文
posted @ 2011-08-23 17:00 陈孝勇 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/liubiqu/archive/2008/08/14/1267867.html在java.lang包中也有String.split()方法,与.net的类似,都是返回是一个字符型数组,但使用过程中还有一些小技巧。如执行:"2|33|4".split("|")出来的结果是:""2|33|4奇怪吧,不过注意看一下API说明还是知道原因的.java.lang.string.split split 方法 将一个字符串分割为子字符串,然后将结果作为字符串数组返回。 stringObj.spli 阅读全文
posted @ 2011-08-23 11:49 陈孝勇 阅读(207) 评论(0) 推荐(0) 编辑