これは私のクラスの onCreate(...) メソッドです:
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.editor);
setRequestedOrientation(1);
v = new SView(this);
v.setOnTouchListener(this);
//v.setZOrderOnTop(true);
//v.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
setContentView(v);
ImageView back = (ImageView) findViewById(R.id.IVEditor);
bm = loadPhoto("photo", bm);
if(bm != null)
{
//This Section is giving me the error
back.setImageBitmap(bm);
}
}
これがエラーです。ダブルクリックすると、上の分割された部分に移動します。理由はわかりませんが:
11-09 07:42:42.624: E/AndroidRuntime(32472): Caused by: java.lang.NullPointerException
11-09 07:42:42.624: E/AndroidRuntime(32472): at com.synlight_development.tattoo_it.Editor.onCreate(Editor.java:64)
11-09 07:42:42.624: E/AndroidRuntime(32472): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
11-09 07:42:42.624: E/AndroidRuntime(32472): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1785)
11-09 07:42:42.624: E/AndroidRuntime(32472): ... 11 more