I have a problem setting a list's background with transparency. I'm unable to set transparency.
Here is my code:
<ListView android:id="@+id/players_list" android:layout_width="fill_parent"
android:layout_below="@+id/players_text" android:layout_height="wrap_content"
android:cacheColorHint="#00000000" android:background="#00000000">
</ListView>
In my activity:
ListView list = (ListView) findViewById(R.id.players_list);
ArrayList<HashMap<String, Object>> mylist = new ArrayList<HashMap<String, Object>>();
HashMap<String, Object> map1 = new HashMap<String, Object>();
map1.put("field1", "John Doe");
map1.put("field2", "2342");
mylist.add(map1);
HashMap<String, Object> map2 = new HashMap<String, Object>();
map2.put("field1", "Simina Dorin");
map2.put("field2", "10000");
mylist.add(map2);
SimpleAdapter mSchedule = new SimpleAdapter(this, mylist,
R.layout.online_players_row,
new String[] { "field1", "field2" }, new int[] {
R.id.players_text, R.id.score_text });
list.setAdapter(mSchedule);
Any advices?
Found the problem: I had to set my list's row layout with a background like: android:background="#80439197"