public class MainActivity extends Activity { private RelativeLayout mRelativeLayout; private double Stimes = System.currentTimeMillis(); private double Etimes; private int i;
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 객체 생성
ImageView wh1 = new ImageView(this); wh1.setImageResource(R.drawable.wh); wh1.setLayoutParams(new Gallery.LayoutParams(40,40)); wh1.setX(0); wh1.setY(0);