摘要: 处在多媒体时代,没有图片显示怎么可以?幸好 android 为我们提供了图片显示的控件imageVIew,下面的程序将通过这个控件实现触摸屏幕更换显示的图片。程序开始运行<ignore_js_op>单击屏幕之后,更换图片<ignore_js_op>?代码片段,双击复制0102030405060708091011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 阅读全文
posted @ 2012-09-06 16:24 ProgrammerZHANG 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 最近做一个图片浏览器,用BaseAdapter用到想和它分手(其实还好啦,挺好用的,好扩展!),核心应该是getView方法的重写吧,主要有几点收获吧,在这里说说~说说~: [代码]java代码:01@Override02publicView getView(intposition, View convertView, ViewGroup parent)03{04ImageView imageView;05Bitmap bitmap = getItem(position);0607if(convertView ==null)08{09imageView =newImageView(getCon 阅读全文
posted @ 2012-09-06 11:02 ProgrammerZHANG 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 前言首先我们要知道setTag方法是干什么的,SDK解释为TagsUnlike IDs, tags are not used to identify views. Tags are essentially an extra piece of information that can be associated with a view. They are most often used as a convenience to store data related to views in the views themselves rather than by putting them in a s 阅读全文
posted @ 2012-09-06 11:02 ProgrammerZHANG 阅读(206) 评论(0) 推荐(0) 编辑