public class MainActivity extends Activity { private RelativeLayout mRelativeLayout; private int i; private int x = 0; private int y = 0; testThread test = new testThread(); ImageView wh1 ;
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); // 타이틀을 없애는 것. // ImageView 를 추가하기 위한 RelativeLayout 생성 mRelativeLayout = new RelativeLayout(this);
mRelativeLayout.setBackgroundDrawable(getResources().getDrawable(R.drawable.board)); // ImageView 객체 생성
wh1 = new ImageView( this ) ; wh1.setImageResource(R.drawable.wh); // wh1.setX(x); // wh1.setY(y); // wh1.setLayoutParams(new Gallery.LayoutParams(40,40));