package <yourPackage, example: com.almondmendoza.firstDemo> import android.app.Activity; import android.os.Bundle; public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); } }
Quick Explanation
If you had developed in Rails/CakePHP like framework, this code, this.setContentView(R.layout.main); is like setting which layout (R.layout.main) to use to your controller (Activity).
I'll update the previous post to point to this. Hope it helps
Update History
Jan 17, 2012 - Visual Update