Well, you need to write some logic in the adapter. But since you are using the SimpleAdapter, you can't. You have to make a custom adapter of your own which extends the SimpleAdapter or the BaseAdapter. This will help.
Whenever an item is clicked, change an attribute of your data which suggests that it is clicked. And in the getView method, change the color/background of that view. Thanks and Regards, Kumar Bibek On Apr 6, 10:05 pm, [email protected] wrote: > Hello, > I am having problems figuring out how to access text settings for an item in > a ListView. I setup a basic ListView in my layout xml: > <ListView > android:id="@android:id/list" > android:textColor="#ff000000" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:layout_x="1px" > android:layout_y="161px" > android:visibility="visible" > > > </ListView> > My ListAdapter is a SimpleAdapter with a hashmap of values displayed in my > ListView. I have an onListItemClick method in my ListActivity which captures > and properly identifies the item selected in my ListView. What I am trying > to do is change the text color or font of the item that is selected in the > method, onListItemClick(ListView l, View v, int position, long id). Is there > a way to access and change the text font and color using the ListView or View > object from this method? I traversed the methods of each class and can't > seem to find one that allows for that functionality. > Thank you very much! > Dan -- 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 To unsubscribe, reply using "remove me" as the subject.

