I have a ViewPager which switches between Fragments that have a SciChartSurface in their layout. I have two problems with this.
-
When swiping the ViewPager the SciChartSurface shows a black bar on its side (see attached image).
-
When swiping I cannot achieve 60 fps on my device. Upon inspecting systrace I see scheduling delay for each frame. Upon inspecting Android profiler’s flame chart I see that SurfaceView calls android.os.BinderProxy.transact() which takes most of the time. If I change the layout of the Fragments used in ViewPager to a normal View, then android.os.MessageQueue.nativePollOnce() takes about 80% of the time, which means most of the time the CPU is idling because drawing takes up so little time.
My question is how can I solve both problems. Have I configured the SciChartSurface wrongly to get the black bars. Can I do anything to speed up changing tabs in ViewPager with SciChartSurfaces in the Fragments?
Edit 14. 1. 2019
I have attached a sample project to reproduce the problem.
- MIha Rozina asked 5 years ago
- last active 5 years ago