We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
翻了下源码 没找到相应的方法
The text was updated successfully, but these errors were encountered:
目前只能通过重新setData来重复添加旧数据+新数据
marqueeView.stopFlipping(); marqueeData.addAll(Arrays.asList("1", "2", "3")); marqueeFactory.setData(marqueeData); marqueeView.startFlipping();
总感觉不够优雅 因为需要把旧数据和新数据重新setData一次 MarqueeFactory应该提供直接更新的方法才好 但是我看MarqueeFactory类里相应的方法被设置成private了
我觉得如果将notifyDataChanged方法这样扩展应该是可以的
public void notifyDataChanged() { if (this.dataList == null) { return; } if (mViews != null){ mViews.clear(); }else { mViews = new ArrayList<>(); } for (int i = 0; i < dataList.size(); i++) { E data = dataList.get(i); T mView = generateMarqueeItemView(data); mViews.add(mView); } if (isAttachedToMarqueeView()) { setChanged(); notifyObservers(COMMAND_UPDATE_DATA); } }
Sorry, something went wrong.
我这里减少数据的长度,
marqueeFactory.setData(marqueeData); marqueeView.startFlipping();
如果正好滚动到边界, 会直接崩溃。
No branches or pull requests
翻了下源码 没找到相应的方法
The text was updated successfully, but these errors were encountered: