Here is the example:
If suppose you have a listview.
Just add the code shown below in your class
ListView mylistview = (ListView)findViewById(R.id.mylistView);
and now you want try make this listview as a transparent then just add the code
shown below:
mylistview.setCacheColorHint(Color.TRANSPARENT);
this will make the listview transparent.