本帖最后由 chijiunan 于 2011-07-31 11:56:38 编辑

解决方案 »

  1.   

    int[] imgId = {R.raw.a1,R.raw.a2...};
    这样引入的时候就可以使用循环了
      

  2.   

    findViewById 找的是一个layout中的东西,你的raw中的怎么可能找到呢
      

  3.   

    android.resource://package_name/type/name
    package_name is your package name as listed in your AndroidManifest.xml. For example com.example.myapp
    type is the string form of the resource type. For example, raw or drawable. name is the string form of the resource name. That is, whatever the file name was in your res directory, without the type extension. The easiest way to construct this form isUri uri = Uri.parse("android.resource://package_name/raw/my_resource");这个用for循环可以取得uri,如果你的对象可以直接用uri作参数的话。
      

  4.   

    呵呵,可以把它们的ID存储到一个数字中!以后引用只需寻找ID即可!