ImagerLoaderBanner类
需要依赖:
compile 'com.youth.banner:banner:1.4.9'
compile 'com.github.bumptech.glide:glide:3.7.0'
别忘了加网络权限哦!!! INTERNET
public class ImagerLoaderBanner extends ImageLoader {
@Override
public void displayImage(Context context, Object path, ImageView imageView) {
Glide.with(context).load(path).into(imageView);
}
}
List<String> listm;
listm=new ArrayList<>();
public void getbannerData(List<BannerBean.TopStoriesBean> listb) {
for(int i=0;i<listb.size();i++){
listm.add(listb.get(i).getImage());
}
bb.setImageLoader(new ImageLoaderBanner());
bb.setImages(listm);
bb.start();
}