标签:class 图片 工具类 delay sds deb log nbsp cti
依赖
compile ‘com.youth.banner:banner:+‘
主Activity
private void bannerLunBo() { MyBanner.setImageLoader(new GlideBanner()); list = new ArrayList<>(); list.add("http://down1.sucaitianxia.com/psd02/psd240/psds64498.jpg"); list.add("http://down1.sucaitianxia.com/psd02/psd243/psds66224.jpg"); list.add("http://img0.imgtn.bdimg.com/it/u=2924186653,3675002715&fm=27&gp=0.jpg"); list.add("http://pic.58pic.com/58pic/13/18/02/53W58PIChAj_1024.jpg"); MyBanner.setImages(list); MyBanner.setDelayTime(3000); MyBanner.start(); } //加载图片用到的工具类 public class GlideBanner extends ImageLoader { @Override public void displayImage(Context context, Object path, ImageView imageView) { Glide.with(context).load(path).into(imageView); }
标签:class 图片 工具类 delay sds deb log nbsp cti
原文地址:http://www.cnblogs.com/shangliang88/p/7663041.html