jimmy-cheong / xbanner Goto Github PK
View Code? Open in Web Editor NEW支持无限轮播的安卓广告控件,提供gif动图支持。支持加载网络图片和显示标题,可以自定轮播间隔。 A banner for android supports infinite play,provides gif support.
支持无限轮播的安卓广告控件,提供gif动图支持。支持加载网络图片和显示标题,可以自定轮播间隔。 A banner for android supports infinite play,provides gif support.
It was thrown a exception while filling the banner.
Here is the exception info:
FATAL EXCEPTION: main
Process: com.example.rosuh.fragmenttestdemo, PID: 19278
java.lang.RuntimeException: image size and title size is not the same
size of images: 5
size of titles: 10
if you do Not need titles,please set the banner type to non-title type
at com.app.abby.xbanner.XBanner.checkImageAndTitleNum(XBanner.java:948)
at com.app.abby.xbanner.XBanner.start(XBanner.java:841)
Here are my code:
imageUrls = new ArrayList<>();
titles = new ArrayList<>();
for (int i = 0; i < 5; i ++) {
imageUrls.add(mArticleItems.get(i).getImageUrl());
titles.add(mArticleItems.get(i).getTitle());
}
mXBanner.isAutoPlay(true)
.setBannerTypes(CIRCLE_INDICATOR_TITLE)
.setDelay(3000)
.setImageUrls(imageUrls)
.setTitles(titles)
.setImageLoader(new AbstractUrlLoader() {
@Override
public void loadImages(Context context, String url, ImageView image) {
Glide.with(context)
.load(url)
.into(image);
}
@Override
public void loadGifs(String url, GifImageView gifImageView
, ImageView.ScaleType scaleType) {
}
})
.start();
I also check those size in the DEBUG mode and they were the same.
So I was stuck.
Please help me to figure out the problem.
Thanks~
ic_launcher.png重复问题这个能处理一下吗?
为什么我下载下来运行不来
With an image hosted on the server, why not change the image in real time when agent changes it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.