I have located the problem and just need some help. The adapter resuse
view's in the getView method. What is happing is I am changing the
background and the views are being recycled and the background never
defaults back. Is there a way that I can set the default background of
a view (preferably in java) that I can default is transparent.
view.setBackgroundColor(00000000) does't seem to work. Thanks in
advance!

On Mar 25, 8:57 pm, Mark Murphy <[email protected]> wrote:
> Stefan wrote:
> > Hi. I have an app that displays a list with a custom background. I
> > bind the list view rows with a custom adapter because some of the rows
> > background needs to be assigned a color.
>
> > public void bindView(View view, Context context, Cursor cursor){
> >    super.bindView(view, context, cursor);
>
> >    int color =
> > cursor.getInt(cursor.getColumnIndex(DbAdapter.KEY_COLOR));
>
> >    if (color == 1){
> >                    view.setBackgroundColor(Color.GREEN);
> >    }
> >    else{
> >            view.setBackgroundColor(00000000);
> >    }
> > }
>
> > It works great except some on the rows in the list have a black
> > background instead of the transparent. Can anybody help? Thanks.
>
> Unless there is something behind the ListView, transparent *is* black,
> because it is showing the overall activity black background through.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Beginning Android 2_ from Apress Now Available!- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to