문제

I have a problem with a BI application I'm writing.

The application uses AChartEngine for charts and most of the table data is inflated programmatically. There are currently two main problems I'm facing:

  1. When the application switches orientation, it takes around 8-10 seconds to redraw every dashboard element (i.e. to display data). Is this a problem with overdraw or something else (this happens on N4, N5, Note 3...). This is unacceptable and I really need to fix this!
  2. There's almost 4x overdraw on table row elements, and I managed to get it lower - to around 2-2.5x with getWindow().setBackgroundDrawable(null). How do I fix this much overdraw as everything is inflated from code? (here's an example of how it looks like: http://prntscr.com/2lio5q).
도움이 되었습니까?

해결책 2

I finally fixed the orientation working very slowly. I applied few flags to my FragmentActivity in the manifset and it works much better now, flags are android:configChanges="screenSize|orientation|keyboardHidden".

Keep in mind that for this kind of thing it is much better and Android-like to use the FragmentPagerAdapter than FragmentActivity, but I work with what I got.

Hope this helps someone!

다른 팁

Regarding overdraw: Have you checked Romain Guy's Android Performance Case Study: http://www.curious-creature.org/docs/android-performance-case-study-1.html

You can also find several Google I_O Videos by him (some of them dated) that might be helpful.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top