使用游标中的数据填充int数组?

时间:2014-01-16 09:33:10

标签: android arrays sqlite cursor gallery

我试图从sqlite数据库的光标填充一个int数组。我想设置一个带有一些照片的图库视图,但我的代码不起作用:

String uri = cursor.getString(cursor.getColumnIndex(HipotecaDbAdapter.C_COLUMNA_FOTO1));
          int Idfoto = this.getResources().getIdentifier(uri,null,this.getPackageName());

         imgsimple.setImageResource(Idfoto);

C_COLUMNA_FOTO1有一个字符串:'R.drawable.foto1,R.drawable.foto2'

有什么想法吗?

0 个答案:

没有答案
相关问题