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