My activity extends ListActivity.  I need to programmaticly change the
text color of the TextView defined in list_item.xml (copied below).

I know that Adapter has this method:

public View  getView(int position, View convertView, ViewGroup parent)

but there must be a better way than to iterates through every row to
change the text color of each TextView right?

        SimpleCursorAdapter adapter =
                new SimpleCursorAdapter(this,
                        R.layout.list_item,
                        ...);
        setListAdapter(adapter);

>>>>list_item.xml :

<?xml version="1.0" encoding="utf-8"?>

<TextView xmlns:android="http://schemas.android.com/apk/res/android";
    android:id="@+id/noteitem"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    android:gravity="center_vertical"
    android:paddingLeft="5dip"
    android:singleLine="true"
/>


--~--~---------~--~----~------------~-------~--~----~
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