Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay()
BitmapFactory.decodeResource(getResources(), R.drawable.spaceship);
&&
Bitmap.createScaledBitmap(leftKey, button_width, button_width, true);
class MyView extends View{
public MyView(Context context) {
super(context);
}
}
public MyView(Context context) {
super(context);
setBackgroundColor(Color.BLUE);
gHandler.sendEmptyMessageDelayed(0,1000);
}
//Handler --> 미사일, 우주선, 행선의 위치를 새로 그려줌
Handler gHandler = new Handler(){
public void handleMessage(Message msg){
invalidate();
gHandler.sendEmptyMessageDelayed(0,30);
}
};
to create one object with location and move method.