Method undefinied for type ImageView
<p>Hi there
I'm trying to create an ImageView and to set its position without XML.</p>

<p>I've the following code:</p>

<pre><code>public class myClass {
    Activity act;
    public myClass(Activity act) {
        this.act = act;
    }

    public void setImage(){
        ImageView img = new ImageView(act);
        img.setImageResource(R.drawable.myimg);
        float xpos = 100;
        img.setX(xpos);
    }

}
</code></pre>

<p>I get the error "The method setX(float) is undefined for the type ImageView", i don't have no idea why.
Thank you for your help &amp; regards</p>
