是否可以在SimpleCursorAdapter内动态调整/缩小照片大小? 场景是我通过光标获取sdcard上保存的照片的路径,并通过SimpleCursorAdapter在列表视图中显示它们。
这是我的Activity的onCreate()中代码的一部分:
Cursor c = mydb.rawQuery("select * from events;", null);
if (c != null ) {
c.moveToFirst();
}
String[] from = new String[]{DbHandler.column_id, DbHandler.column_name, DbHandler.column_location, DbHandler.column_date, DbHandler.img_loc};
int[] to = new int[] {R.id.textView1, R.id.textView2, R.id.textView3, R.id.textView4, R.id.photoInDb};
SimpleCursorAdapter simpleCurs = new SimpleCursorAdapter(this, R.layout.listviewfinal, c, from, to);
listView.setAdapter(simpleCurs);
如果有可能,请告诉我如何?我还需要定义setViewValue吗?