Thursday, March 3, 2011

[android-developers] ListView update problem.

I have a ListView with a custom BaseAdapter.

in getView(...) in CustomBaseAdapter class...

I have specified gray color in the 1st row and white color in all
other rows.

if(position==0){
holder.text1.setBackGroundColor(Color.gray) // same for next 2
TextView views.
}else{
//set the textview color to white
}

After I change the content of the specific row (all textViews), I
call
this.notifyDataSetChanged();

The data gets updated properly, but the last row of the ListView
displays gray color along with the first row.
But I have set the gray color to the 1st row..

Any help???
Regards

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate