联系我们 - 广告服务
您的当前位置:官网首页 > 资讯 > 时局 >

XListView实现多条目网络数据刷新加载 网络加载图片

来源: 编辑: 时间:2019-08-05
导读:

mybaseadapter.java

public class mybaseadapter extends baseadapter{
 private list dataitem datas;
 private layoutinflater layoutinflater;
 public mybaseadapter {
 this.layoutinflater = layoutinflater;
 datas=new arraylist ;
 public void setdatas {
 datas.clear;
 if {
 datas.addall;
 notifydatasetchanged;
 public void adddatas {
 if {
 datas.addall;
 notifydatasetchanged;
 public final int view_type_count=2;
 public final int image_text_type=0;
 public final int text_type=1;
 @override
 public int getitemviewtype {
 if {
 return image_text_type;
 }else {
 return text_type;
 @override
 public int getviewtypecount {
 return view_type_count;
 @override
 public int getcount {
 return datas.size;
 @override
 public object getitem {
 return datas.get;
 @override
 public long getitemid {
 return i;
 @override
 public view getview {
 if ==image_text_type){
 viewholder viewholder=null;
 if {
 view = layoutinflater.inflate;
 viewholder = new viewholder;
 }else {
 viewholder =  view.gettag;
 viewholder.binddata getitem);
 }else {
 viewholder2 viewholder2;
 if {
 view = layoutinflater.inflate;
 viewholder2 = new viewholder2;
 viewholder2.textview = view.findviewbyid;
 view.settag;
 }else {
 viewholder2 =  view.gettag;
 viewholder2.textview.settext.gettitle);
 return view;
责任编辑:

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

网友评论:

在“\templets\demo\comments.htm”原来的内容全部删除,插入第三方评论代码,如果不需要评论功能,删除comments.html里面的内容即可
推荐使用友言、多说、畅言(需备案后使用)等社会化评论插件

Copyright © 2018 k8凯发国际娱乐k8凯发国际娱乐-k8凯发国际娱乐下载-k8凯发官方 All Rights Reserved Power by DedeCms
本站所有资讯来源于网络 如有侵权请联系QQ:9490489
Top