[Android] ProgressBar inside SimpleAdapter
- by lemon
I'm trying to add a ProgressBar to my row.xml view but I can't seem to make it work I keep getting
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"
/>
Does anyone have any idea what I'm missing?