Skip to content
New issue

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

开始重影问题,按照下面的解决办法后,第一次进入程序,先是第一条数据,轮播后还是从第一条数据开始 #65

Open
liguangze opened this issue Aug 23, 2018 · 7 comments

Comments

@liguangze
Copy link

如果不加入 @OverRide
public void onStart() {
super.onStart();
L.i("onStart =======");
mMarqueeView.startFlipping();
}

@Override
public void onStop() {
    super.onStop();
    L.i("onStop =======");
    mMarqueeView.stopFlipping();
}

这个代码是没有问题,但是会重影

@qianshengta
Copy link

是的 还是依然会重影

@qianshengta
Copy link

你检查了下代码,startWithList(list)和startFlipping()是不是都调用了。我的问题就是这样的,界面显示时我调用了startFlipping()开启动画。但是在这时候我同样去请求了数据,获得数据后调用了startWithList(list),这就导致重复调用开启动画,导致了重影

@nreckle
Copy link

nreckle commented Jun 14, 2019

你检查了下代码,startWithList(list)和startFlipping()是不是都调用了。我的问题就是这样的,界面显示时我调用了startFlipping()开启动画。但是在这时候我同样去请求了数据,获得数据后调用了startWithList(list),这就导致重复调用开启动画,导致了重影

我取了一个巧,先设置 startWithList("") 然后紧接着设置 startWithList 这样就规避了目前的重影问题

@panhongjin
Copy link

先把所有子view清除,然后清空动画,在停止播放就可以。
mMarqueeView.removeAllViews(); mMarqueeView.clearAnimation(); stopMarquee();

@starktonys
Copy link

starktonys commented Sep 12, 2019

if (MarqueeView.getNotices().isEmpty() && !MarqueeView.getNotices().equals(oldList)) {
//避免重复set 重影问题 不等于空 并且 不等于老的数据就替换
tvAutoOfficeAnnounceHeader.startWithList(mSystemMessages);
}
确实是这个问题导致的,终极解决方案。

问题原因

你检查了下代码,startWithList(list)和startFlipping()是不是都调用了。我的问题就是这样的,界面显示时我调用了startFlipping()开启动画。但是在这时候我同样去请求了数据,获得数据后调用了startWithList(list),这就导致重复调用开启动画,导致了重影

This was referenced Sep 12, 2019
@krcdxnh
Copy link

krcdxnh commented Jan 15, 2020

MarqueeView.getNotices().isEmpty()

MarqueeView.getNotices().isEmpty() 是不等于空的意思吗

@MhuiHugh
Copy link

重影一种重现方式,mvAnimDuration和mvInterval 设置成一样的值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants