ImageView를 만들고 XML없이 위치를 설정하려고합니다.ImageView 유형에 대한 메소드가 정의되지 않았습니다.
는 다음 코드했습니다 나는 오류를
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);
}
}
를 얻을 :
"The method setX(float) is undefined for the type ImageView"
오, 음, 8 단계를 위해 개발 중입니다 ... 고맙습니다 & 소음으로 인해 죄송합니다. – sambob