Activities and Layouts

Most programs need an entry point or a beginning routine where all execution begins. Even the lowly “Hello World” in Java requires a static void main as an entry point. Android programs are the same, it also needs it’s own version of the “function main”. But the entry point of an Android program isn’t just a function called “main”, — it’s a bit more involved than that. Android’s Trinity of Main A simple app in Android that will show a single screen to the user requires three things, (1) an Activity class which acts as the main program file (2) a layout file which contains all UI definitions, and (3) a Manifest file, which ties all the project’s components and resources together — all Android programs require this manifest file.
Read more...