Comments (4)
本来就是从网络上获取的呀。就像你图片的url一样。还是我理解的不对。如果理解的不对,麻烦你描述的更加详细一点。
from banner.
是这样的,我看到所有url和title都是在这个方法中添加的
private List getTitleImageBannerEntry(){ } ;
如果我新开启一个线程,然后从网上得到title和url的字符串,然后再调用
bannerView.setEntries(getImageBannerEntries());
就会直接闪退,并且报错;
java.lang.RuntimeException: You need called the setEntries method!
也就是说,bannerView.setEntries(getImageBannerEntries());必须在onstart的时候立即调用,但是网络加载需要时间,所以会出错。
我看到很多app都是有一个guide,启动app之后等待一段时间再到主界面,我想问一下url和title是不是要在guide里面加载。不能在主界面直接加载?
from banner.
你加一下我的微信吧,kelinZQL。
from banner.
不是你说的这么回事儿,setEntries被调用之前你就去调用selectCenterPage去手动选中某个Banner页,当然不行啊,本着防御式编程的原则所以我这里抛出一个异常。就是为了告诉你这么调用是不对的。但是可能我提示的不够明白,我后面会改成You need to call the 'setEntries' method before calling the 'selectCenterPage' method!
from banner.
Related Issues (15)
- addViewInLayout不是必调用的方法 HOT 1
- 你这东西过于复杂吧 HOT 5
- 圆点指示器没有空心属性 HOT 2
- BannerView 如果内容集合只有一条数据的时候,setOnPageClickListener 点击无效 HOT 3
- 请问条形指示器这里要怎么写 HOT 1
- 没有属性介绍文档嘛 HOT 1
- 怎么在xml中配置不自动轮播 HOT 1
- 出现闪烁 HOT 1
- 无限轮播有时候会停止 HOT 4
- 使用setShowLeftAndRightPage后第一张图片会变形 HOT 1
- 各种效果中的第二个效果什么配置,你的代码中没有写到,只有效果图
- 找到了
- 是不是没有自定义指示器的功能 HOT 1
- 无限轮播有时会停止 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from banner.