Question

i've got a special situation with a proprietary android touch panel. In a Android app i've got multiple textview fields on a page which use the marquee feature. => All is working fine but marquee is using nearly 100% cpu load if we have more than about 7 TextView elements on the page.

load goes to 0%-1% if marquee is turned off.

we are quiet sure that the graphics driver of this touch panel we got here is broken but we have no possibilites to exchange anything there because it's all closed.

In detail: CPU profiling (with DDMS) reveals that the most of the time is used in android.graphics.Canvas.nativeDrawPath(III)V

Now my question: What do you suggest in this case?

(i cannot use multi-line fields because the ui is user customizeable and there are predefined widget and i cannot make the fields larger either)

oh yes it's android 2.3.3 and i cannot upgrade. i don't know how smart the android 2.3 marquee effect is - so i'm thinking about implementing my own marquee effect and try to group repaint requests together but i thought that i ask here first.

i also tried the textView caching but this did not help.

thanks for any hint, michael

Was it helpful?

Solution

For other with the same issue:

I implemented my own "class ScrollTextView extends TextView" which implements a custom, character based marquee which looks nice and performs a lot better. (remove 1 char at the beginning every 333 ms with a small pause at the start. Then repeat.).

If the app is not deployed on the device with the horrfic graphics driver, it simply activates the TextView's marquee.

strange, unexpected problem solved :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top