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!

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