On Thu, Jan 5, 2012 at 11:07 AM, John Davis <davi...@gmail.com> wrote:
> If I want to change the text color should I uses
> SetBackgroundColor or SetTextColor?

setTextColor(). Note that you probably do not want to be using a hex
value, but rather a ColorStateList, if your color may be unreadable
when a row is selected (e.g., using the D-pad/trackball/arrow
keys/etc.).

> Also, do I need to dork with the
> adapter in the main class to invoke getView?  It looks from your
> example I don't need to do that.

You need to use your custom Adapter in your setAdapter() or
setListAdapter() call in onCreate().

> Lastly, this approach seems to get
> all the text to be the same color once I get it working.  Any idea if
> I can set individual line item colors?

Yes. Put in appropriate business logic in getView() to make the
decision of what color should be used.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

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

Reply via email to