Android Java project — Receipt Generator using Android phone and Bluetooth thermal printer — Part 2 of 7 , Building the MainActivity

All applications(apps) consist of an Activity and a Layout.

The different views or pages of an app is call Activity in Android development jargon. The Activity is where the coding for the User Interface (UI) resides. Eg. User click a button, a message pops out. Usually an app will have a MainActivity, which is usually the 1st page a user see when the app icon is clicked.

Another part of an app is its Layout. It is a xml file which determine the appearance of the app. Eg. The position, size and appearance of a button, text view or any widgets.

Ok, now let’s code and build the MainActivity.