title: Android : cannot read image in assets folder and assign to imageview
body: <p>I have a file <code>food.jpg</code> in assets folder. I have try many ways. but I still cannot get this image into imageView. when run, instead of display image "food.jpg", it displays image that I have declared in xml file. (that image is in drawable folder).</p>
  
  <p>The first way is:</p>
  
  <pre><code>int asset_id = context.getResources().getIdentifier("food", "drawable", context.getPackageName());
  imageView.setImageResource(asset_id);
  </code></pre>
  
  <p>The second way is:</p>
  
  <pre><code>AssetManager assetManager = context.getAssets();
  InputStream istr;
  try {
           istr = assetManager.open("food");
           Bitmap bitmap = BitmapFactory.decodeStream(istr);
           imageView.setImageBitmap(bitmap);
                   istr.close();
          } catch (IOException e) {
              e.printStackTrace();
  }
  </code></pre>
  
  <p>Please teach me how to fix this problem.</p>
  
  <p>thanks :)</p>