Change content of TextView on an item in Custom ListView?

Suppose your row layout for an item in the list is wrapped in a linear layout with 3 textviews. Then if you want to access the 2nd textview of the 2nd item in the list, this would be the code LinearLayout rowLayout = (LinearLayout)getListView(). GetItemAtPosition(1); TextView secondTextView = (TextView)rowLayout.

GetChildAt(1); secondTextView. SetText("New Text").

Suppose your row layout for an item in the list is wrapped in a linear layout with 3 textviews. Then if you want to access the 2nd textview of the 2nd item in the list, this would be the code. LinearLayout rowLayout = (LinearLayout)getListView().

GetItemAtPosition(1); TextView secondTextView = (TextView)rowLayout. GetChildAt(1); secondTextView. SetText("New Text").

Thanks. But what the getListView() mean? – Han Tran Sep 11 at 16:29 To implement a list view you use a a ListActivity in android.

GetListView is a method of list activity which returns the listview. – blessenm Sep 11 at 16:52 I have edit my post, please healp me :) – Han Tran Sep 11 at 17:07 Does this line list_playlist. GetFirstVisiblePosition()+current_song return a integer?

Are you getting any errors in the logcat? – blessenm Sep 11 at 18:25 Yeah, it's return an interger. In Logcat I see this: 09-12 08:12:20.536: ERROR/AndroidRuntime(9536): java.lang.

ClassCastException: han.work.youtube. Item_Content Item_Content is class contain data each item on listview! – Han Tran 09-128 at 1:13.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions