我正在尝试向row.xml视图中添加一个progressbar,但似乎无法使其正常工作,我一直在努力。
06-09 12:44:44.802: ERROR/AndroidRuntime(1012): java.lang.IllegalStateException: android.widget.ProgressBar is not a view that can be bounds by this SimpleAdapter
ArrayList arr = new ArrayList();
HashMap map = new HashMap();
map.put("progress", 10);
arr.add(map);
String [] fieldNames = {"progress"};
int [] fieldIds = {R.id.progress};
SimpleAdapter adapter = new SimpleAdapter(this, arr, R.layout.row, fieldNames, fieldIds);
list = (ListView) findViewById(R.id.list);
list.setAdapter(adapter);
<ProgressBar android:id="@+id/progress"
style="?android:attr/progressBarStyleHorizontal"
android:max="100"
android:progress="5"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
有人知道我遗漏了什么吗?