我有一个问题,即提出一个具有透明度的清单。 我无法确定透明度。
我的守则是:
<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>
在我的活动中:
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);
任何建议?
Found the problem: I had to set my list s row layout with a background like: android:background="#80439197"