ViewHolder是什么就不解释了。 大家通常怎么写ViewHolder呢? ViewHolder holder = null; if(convertView == null){ convertView = mInflater.inflate(R.layout.xxx null); holder ...
分类:
其他好文 时间:
2014-06-27 22:40:42
阅读次数:
306
Inflate() method can find out a layout defined by xml,as like the findViewById() method,but there have some different between them.
The different are:
If your Activity used other layout,such as...
分类:
移动开发 时间:
2014-06-22 06:41:43
阅读次数:
362
在Android开发中为了inflate一个布局文件,大体有2种方式,如下所示:
// 1. get a instance of LayoutInflater, then do whatever you want
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOU...
分类:
移动开发 时间:
2014-06-17 16:42:35
阅读次数:
360
注:
1、引用了android.support.v4.app.*;包中的组件;
2、为了兼容android1.6,MainActivity继承于FrameActivity;
3、改代码中fragment已写入xml中,缺点是不能实现动态的增删,后面的学习将使用代码来进行添加删除fragment。
4、onCreateView方法中,inflater.inflate(R.layo...
分类:
其他好文 时间:
2014-06-15 18:12:33
阅读次数:
153
PopupWindow可以实现浮层效果,而且可以自定义显示位置,出现和退出时的动画。首先解析一个ViewLayoutInflater
inflater = getLayoutInflater();final View view =
inflater.inflate(R.layout.popup, n...
#上层makefile调用执行make命令,执行的应该是第一个目标allHEAD =
head.oSYSTEM = ../tools/zSystem#LD = gcc#TEST = -DTEST_DRIVERzOBJECTS = $(HEAD)
inflate.o unzip.o misc.oCFL...
分类:
其他好文 时间:
2014-06-08 07:38:47
阅读次数:
245
缺少libz.dylib库的时候引起的一个链接错误
Undefined symbols for architecture armv7s:
"_inflate", referenced from:
-[ASIDataDecompressor uncompressBytes:length:error:] in ASIDataDecompressor.o
"_deflate", refere...
分类:
其他好文 时间:
2014-06-05 00:09:02
阅读次数:
267
View view =
LayoutInflater.from(mContext).inflate(R.layout.song_item_adapter,
null);LayoutInflater inflater = (LayoutInflater)context.getSystemService...
分类:
移动开发 时间:
2014-05-29 00:32:23
阅读次数:
227
在一个Activity从创建到销毁的完整的生存期内,它会经历活动生存期和可见生存期的一次或者多次重复,
完整生存期:
Activity的完整生存期是指对onCreate方法的第一次调用和对onDestroy方法的最后一次调用之间的时间范围。有时候还会发生一个Activity的进程被终止,却没调用Destroy的情况。
使用onCreate方法来初始化Activity:inflate用户界面,...
分类:
其他好文 时间:
2014-05-25 18:27:51
阅读次数:
305
写的一个Android对话框,点击按钮获取EditText里面的值,这里一直报空指针异常,研究了很长时间终于解决了。
异常如下:
我原来的代码:
//更新对话框
private void updateDialog(final String id){
TableLayout updatemsg = (TableLayout)getLayoutInflater().inflate(...
分类:
移动开发 时间:
2014-05-22 06:40:46
阅读次数:
355