How can I make my view pager more smooth?

2020-03-24 02:48发布

问题:

I am using a view pager to show two fragments. One fragment contains a camera preview and the other one just a simple list view.

The problem is, that the whole swipe experience is not as smooth as it should be. And I guess the reason for that is because the UI Thread has to handle the view pager, the camera and the list view all at once.

Now, what can I do about that? What can I run in a background thread? Can I run the view pager in the background?