In my application, I apply the transparent background to my ListView
\'s CustomListItem at runtime. For that I use, convertView.setBackgroundColor(android.
Use this from now in your xml's files when you want transparency in your views:
android:background="@null"
You are going to get a better performance.
Try:
convertView.setBackgroundColor(Color.argb(0, 0, 0, 0));
android.R.color.transparent
is a resource id (referring to a transparent color definition) - View.setBackgroundColor(int)
expects an actual int color.
Use View.setBackgroundResource(int) instead, which will load the actual color from resources.
Set this attribute to your listview in xml file
android:background="@android:color/transparent"
and also apply the transparent background to your ListView's CustomListItem at runtime. For that you have use,
convertView.setBackgroundColor(Color.TRANSPARENT);
Thanks
convertView.setBackgroundColor(Color.argb(0, 0, 0, 0));
OR
convertView.setBackgroundColor(Color.parseColor("#00000000"));