As well as identifying a layout using a resource ID, as we did here, setContentView() can also take a View as an argument, for example:
findViewById(R.id.myView) setContentView(myView);