When I'm trying to set the background colour of the listitem , say
with
position 0, the colour is repeated on other listitems when I scroll
through the listview.

My code is

class CustomAdapter extends SimpleCursorAdapter {


               public CustomAdapter(Activity context, int task_row,
Cursor tasks2,
                               String[] from, int[] to) {
                       super(context , task_row,tasks2, from, to);

               }

               @Override
               public View getView(int position, View convertView,
ViewGroup
parent) {
                       View row = super.getView(position, convertView,
parent);

                       if(position ==0)
                       {
                               row.setBackgroundColor
(Color.CYAN )     ;
                       }
...

Any suggestions on how to stop the repeats?

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