The ListView can use Simpleadapter to bind the data to the view, but it is bound to the existing system controls and will be an error if the custom space uses simpleadapter bindings directly.
For example, using the Circleimageview round Head, the direct cannot bind need to re-simpleadapter the method.
Eg:android ListView rewrite simpleadapter display picture asynchronous loading and word processing
Simpleadapter=Newsimpleadapter (context, Mdata, R.layout.goods_info,Newstring[]{"Name", "Small_pic", "Price"}, New int[]{r.id.goods_name,r.id.goodsimg,r.id.goods_price}] {@Override Public voidSetviewimage (FinalImageView V,FinalString value) { //TODO auto-generated Method Stub if(V.getid () = =r.id.goodsimg) {NewThread (NewRunnable () {@Override Public voidrun () {Try{ //return bitmap via picture URL FinalBitmap img=Streamtool.returnbitmap (value); Handler.post (NewRunnable () {@Override Public voidrun () {if(img!=NULL) {V.setimagebitmap (IMG);} } }); } Catch(Exception e) {e.printstacktrace (); } } }). Start (); } Else{Super. Setviewimage (v, value);} } };
Reference
[1] Android ListView rewrite simpleadapter display picture asynchronous loading and word processing. http://www.cnblogs.com/freexiaoyu/archive/2012/03/11/2390655.html
[2] Android custom Adapter listview.http://www.linuxidc.com/linux/2011-05/35394.htm
[3] Custom simpleadapter.http://www.cnblogs.com/angeldevil/archive/2012/04/05/2432615.html
Android Development (14)--simpleadapter with custom controls