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

性能问题 #44

Open
jianjunxiao opened this issue Apr 3, 2019 · 8 comments
Open

性能问题 #44

jianjunxiao opened this issue Apr 3, 2019 · 8 comments

Comments

@jianjunxiao
Copy link

hello,无限轮播的时候,一直调用holder的createView,里面不断通过LayoutInflater填充生成View,这会有性能问题吧,感觉holder没起到复用的作用。

@wenchaosong
Copy link
Owner

@xiaoyanger0825 这个问题是存在的,后续肯定会优化的

@wenchaosong
Copy link
Owner

其他人有好的解决方案也可以直接提 pr

@ZTFtrue
Copy link
Contributor

ZTFtrue commented May 9, 2019

如果对动画没有要求,RecyclerView也可以实现

    recyclerView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                // TODO 写事件
               recyclerView.scrollToPosition(i);
                return true;
            }
        });

@wenchaosong
Copy link
Owner

@ZTFtrue 是,RecyclerView 相关的库有很多

@xyZangGit
Copy link

这个问题什么时候可以优化掉啊?

@wenchaosong
Copy link
Owner

@xyZangGit 这个要动整体实现方式,具体在文档中指出了

@DavidZXY
Copy link

DavidZXY commented Jul 2, 2019

emmm, 是不是可以考虑用viewpager2

@ZTFtrue
Copy link
Contributor

ZTFtrue commented Jul 2, 2019

emmm, 是不是可以考虑用viewpager2

是可以考虑的

Repository owner deleted a comment from leeyushi Nov 13, 2019
Repository owner deleted a comment from leeyushi Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants