title: How to load image in imageview using resource id which is saved in database
body: <p>I have added resource id in list. And used that resourceid to load image in ImageView. But it shows black. I have done it this way. Thanks in advance.</p>
  
  <pre><code>private void initArcMenu(ArcMenu menu, int[] itemDrawables, final ArrayList&lt;AppInfo&gt; appinfo) {
          final int itemCount = appinfo.size();
  
          for (int i = 0; i &lt; itemCount; i++) {
  
              long drawable =  appinfo.get(i).getIconResourceId();
              appinfo.get(0).getIconResourceId();
              ImageView item = new ImageView(this);
             // item.setImageResource((int) drawable);
              item.setImageBitmap(BitmapFactory.decodeResource(getResources(),(int)appinfo.get(i).getIconResourceId()));
              Log.e("Simple drawable",(int) drawable+"");
              final int position = i;
              menu.addItem(item, new View.OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
  
  
                      Toast.makeText(RingActivity.this, "position:" + appinfo.get(position).getAppName(), Toast.LENGTH_SHORT).show();
                  }
              });
          }
      }
  </code></pre>