After pulling my hair out for hours ...it turns out performance only
degrades when the debugger is running! I'm guessing the debugger has
always dragged down performance for obvious reasons and my text
processing in this case pushed it over the edge where the debuggers
effect became noticeable? Either way I'm happy. It's still smokin'
fast on fling. :-D

Hopefully this helps someone down the road seeing similar behavior!

-Stace


On Jun 18, 10:05 am, Connick <[email protected]> wrote:
> Hi all,
>
> I've got a list few which I've optimized in every possible way. Performance
> matches the exchange email client so I'm happy in that respect. It's very
> fluid regardless of the number of records. The problem is the moment I
> introduce some conditional formatting of TextViews (think bold for unread,
> normal for read) the list starts to get choppy when the user flings the
> list. Is there a better way to tackle this formatting?
>
> My layout is optimized (single relative layout) and I'm using a viewwrapper.
>
> Example: (in my actual code there are 4 Textviews)
>
> Spannable s = (Spannable) w.stepname.getText();
>
>             if( state.equalsIgnoreCase( Tasks.STATE_READ ))
>             {
>                 s.setSpan( new StyleSpan( Typeface.NORMAL ), 0, s.length(),
> Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
>
>                 w.getStepName().setTextColor( 0xFFBDBEBD );
>             }
>             else
>             {
>                 s.setSpan( new StyleSpan( Typeface.BOLD ), 0, s.length(),
> Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
>
>                 w.getStepName().setTextColor( 0xFFFFFFFF );
>             }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to