Information Systems



Android R.layout.main findViewById returns null

Inside the main Activity findViewById seems to return null.
setContentView(R.layout.main);
LinearLayout ll = (LinearLayout) findViewById(R.layout.main);

Apparently you need to create a sublayout of R.layout.main. The top level is not findable.