Android App Basics

Here we can take an example of GeoQuiz application will consist of an activity and a layout:
• An activity is an instance of Activity, a class in the Android SDK. An activity is responsible for
managing user interaction with a screen of information.
You write subclasses of Activity to implement the functionality that your app requires. A simple
application may need only one subclass; a complex application can have many.
GeoQuiz is a simple app, so it will have a single Activity subclass named QuizActivity.
QuizActivity will manage the user interface shown in Figure 1.1.
• A layout defines a set of user interface objects and their position on the screen. A layout is made
up of definitions written in XML. Each definition is used to create an object that appears on
screen, like a button or some text.
GeoQuiz will include a layout file named activity_quiz.xml. The XML in this file will define
the user interface shown in Figure 1.1.

Leave a Reply

Your email address will not be published. Required fields are marked *