Viewing images from asset folder
<p>I created image folder under assets, I wrote this code to read all image names and store them in an array.</p>

<pre><code> String[] filename = getAssets().list("images");
    for(String name:filename){
            if(accept(name))
            {
                imageNames[i]=name;
                txt.append(" File  "+i+". "+imageNames[i]);
                i++;
            }
</code></pre>

<p>and now I want to view <code>imagename[i]</code> to the <code>ImageView</code>. To do that I used </p>

<pre><code>   AssetManager r=getResources().getAssets();
    InputStream readAs;

                try {
                        readAs = r.open(imagename[4]);
                        // create drawable from stream

                   Drawable d = Drawable.createFromStream(readAs,null);
                   image.setImageDrawable(d); 
                   readAs.close();
                    }
                     catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                    txt.append(" Error Sydney :"+e.getMessage());
                }
</code></pre>

<p>it gives me Error <code>Ioxception</code> with <code>imagename[4]</code>. Any help would be greatly appreciated.</p>
