제가 그냥 예제 연습삼아 그림넣기를 하고있었는데..
package com.Bong.example;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
public class DrawImage extends View{
Drawable img;
int ix, iy;
int imgWidth, imgHeight;
public DrawImage(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
img = this.getResources().getDrawable(R.drawable.image);
}
@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
imgWidth = img.getIntrinsicWidth();
imgHeight = img.getIntrinsicHeight();
ix = 0;
iy = 0;
img.setBounds(ix, iy, ix+imgWidth, iy+imgHeight);
img.draw(canvas);
super.onDraw(canvas);
}
}
이렇게 치니까 런처가 날라가버렸네요..ㄷㄷ;;
제 폰으로 하다가 폰 런처 날려먹고.. 복구도 안되고..
런처가 그냥 없어져버렸네요..ㅠㅠ
혹시나 해서 에뮬레이터를 돌려버려도 에뮬레이터에도 런처가 사라지는..
다행히 에뮬레이터는 다시 띄우면 되지만..
혹시 이 예제에서 제가 실수한 부분이 있나요?
아님 런처가 없어지게끔 잘못만졌나,,,
혹시 아는분 있으시면 알려주세요.ㅎ
소스에는 문제가 없는것 같은데..ㅠㅠ