Need suggestion about a mixed "Uri / int id" images ambient
<p>I have the following problem:</p>

<p>suppose that until now, I am using  R.drawable.img to set the image in some imageviews
with</p>

<pre><code>imgView.setImage(aProduct.getImgId());
</code></pre>

<hr>

<p>the simplified product class look like this:</p>

<pre><code>class Product{
        int imgId;

        ....
        public void setImgId(int id){
        this.imgId=id;
        }

        public int getImgId(){
        return this.imgId
        }

        ...




    }
</code></pre>

<p>my application is now "evolved" because the user can add customized products
taking the img from the camera and getting the Uri of the picture.
and to set the image on the ImageView imgView.setImgURI(Uri)</p>

<p>Now my question is:
what would be the best approach to have a mixed int/Uri image resources ambient?
can I obtain the Uri of a "R.drawable.img"?</p>

<p>I'm not sure if my question is clear, I mean:</p>

<p>I have to check, before to set the imageview, if my product has an Uri or an int Id,
and then make an "if" to call the appropriate method, or there is a simpler solution?</p>

<p>Thank you for reading, and sorry for my english.</p>

<p>Regards.</p>
