1.
ADT stands for
ADT (Android Development Tools) was a plugin for Eclipse that helped in developing Android
applications. It provided tools for UI design, debugging, and performance analysis but was
replaced by Android Studio.
2. Purpose of androidmanifest.xml
AndroidManifest.xml is an essential configuration file for an Android app. It:
● Declares app components (activities, services, receivers, providers)
● Defines app permissions
● Specifies hardware and software requirements
● Sets app themes and launcher icons.
3. Different types of layout managers.
Android provides several layout managers for designing UI:
● LinearLayout – Arranges views in a single row/column
● RelativeLayout – Positions views relative to each other
● ConstraintLayout – Uses constraints for flexible layouts
● FrameLayout – Overlaps multiple views
● TableLayout – Displays elements in rows and columns
● GridLayout – Organizes views in a grid
4. AVD and Emulator
● AVD (Android Virtual Device): A configuration that defines an Android emulator's
hardware and software settings.
● Emulator: A virtual Android device that simulates a real device for testing apps
without using physical hardware.
5. Why do we need Fragments in Android?
Fragments allow modular UI design and flexibility in multi-screen devices. They:
● Allow reuse of UI components
● Improve performance by loading part of the UI instead of reloading an entire
activity
● Support dynamic and flexible UI designs
6. How does Toast work in Android?
A Toast is a short message displayed to the user. It appears for a few seconds and
disappears automatically.
7. What is the base class of the Android database?
The base class for managing databases in Android is SQLiteOpenHelper. It simplifies
database creation, version management, and migration.
8. What are the uses of the Spinner control in Android?
A Spinner is a dropdown menu that allows users to select an option.
9. What is an Intent in Android?
An Intent is a messaging object that allows communication between components
(activities, services, broadcast receivers).
10.What are Android Java packages?
Important Java packages in Android:
● android.app – App components
● android.view – UI rendering
● android.widget – UI elements
● android.content – App interactions
● android.database – Database handling
11.Name the different UI controls available in Android.
● TextView – Displays text
● EditText – Accepts user input
● Button – Clickable button
● ImageView – Displays images
● CheckBox – Multi-select options
● RadioButton – Single selection option
● SeekBar – Adjustable progress
12.What are the elements of the Android software stack?
● Linux Kernel – Hardware interaction
● Libraries – SQLite, WebKit, OpenGL
● Android Runtime – Dalvik/ART virtual machine
● Application Framework – APIs for developers
● Applications – User-installed and system apps
13.Define the structure of an Android application.
● Java/Kotlin Code – Business logic
● XML Layout Files – UI design
● AndroidManifest.xml – App configuration
● Resources (res/ folder) – Images, strings, and styles
● Gradle Scripts – Build configuration
14.Explain Cursor in Android SQLite with an example.
A Cursor is used to retrieve query results from SQLite.
Cursor cursor = db.rawQuery("SELECT * FROM users", null);
if (cursor.moveToFirst()) {
do {
String name = cursor.getString(0);
} while (cursor.moveToNext());
}
cursor.close();
15.Explain the Activity Life Cycle in Android.
● onCreate() – Activity created
● onStart() – Activity visible
● onResume() – User interacts with activity
● onPause() – Activity partially visible
● onStop() – Activity hidden
● onDestroy() – Activity destroyed
16.Explain working of an Intent.
Intents are used to start activities, services, and broadcasts.
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
startActivity(intent);