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

会有叠字的情况出现 #4

Open
Kenmmm opened this issue Jul 17, 2018 · 5 comments
Open

会有叠字的情况出现 #4

Kenmmm opened this issue Jul 17, 2018 · 5 comments

Comments

@Kenmmm
Copy link

Kenmmm commented Jul 17, 2018

两条消息间隔太短,可能会重叠的情况

@ChessLuo
Copy link
Owner

ChessLuo commented Aug 3, 2018

Step 4.在Activity或者Fragment中的onResume()和onStop()方法分别调用startViewAnimator()和stopViewAnimator(),防止返回页面出现文字重影问题!

@wisdomcai
Copy link

用Viewpager将fragment包起来后,fragment里的textbannerView依旧会重影

@mackwu828
Copy link

@ChessLuo 如果fragment用的hide和show方法,要在onHiddenChanged里调用startViewAnimator()和stopViewAnimator()

    override fun onHiddenChanged(hidden: Boolean) {
        super.onHiddenChanged(hidden)
        if (hidden) text_banner_view.stopViewAnimator() else text_banner_view.startViewAnimator()
    }

@Trammels
Copy link

这个应该是个bug,在滑动到一半的时候去重新设置值,会出来叠字,即使使用了stopViewAnimator

@Trammels
Copy link

/*设置数据集合/
public void setDatas(List datas){
this.mDatas = datas;
if (DisplayUtils.notEmpty(mDatas)){
mViewFlipper.removeAllViews();
for (int i = 0; i < mDatas.size(); i++) {
TextView textView = new TextView(getContext());
setTextView(textView,i);

            mViewFlipper.addView(textView,i);//添加子view,并标识子view位置
        }
    }

}

这个逻辑是错误的,如果开始有数据,重新设置一个无数据的,这个就没有办法刷新

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

5 participants