0% found this document useful (0 votes)
5 views32 pages

Android Application Programming (1)

The document contains multiple-choice questions (MCQs) related to Android application development, covering topics such as the Android operating system, its versions, architecture, and development tools. It includes questions about features introduced in various Android versions, the purpose of different components, and the tools used for Android development. The content is organized into units focusing on the introduction to Android and the installation and configuration of the Android environment.

Uploaded by

truptibodke77
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
5 views32 pages

Android Application Programming (1)

The document contains multiple-choice questions (MCQs) related to Android application development, covering topics such as the Android operating system, its versions, architecture, and development tools. It includes questions about features introduced in various Android versions, the purpose of different components, and the tools used for Android development. The content is organized into units focusing on the introduction to Android and the installation and configuration of the Android environment.

Uploaded by

truptibodke77
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 32

ANDROID APPLICATION DEVLOPMENT [MCQ’S]

Android Application Programming

UNIT I Introduction to Android Operating System


(Weightage-6 marks)
 Which version of Android was the first to introduce multi-user support?
a) Jelly Bean
b) Lollipop
c) KitKat
d) Marshmallow
Answer: a) Jelly Bean
 What is the name of Android version 9?
a) Oreo
b) Pie
c) Nougat
d) KitKat
Answer: b) Pie
 Which Android version introduced the "Doze" mode to save battery?
a) Marshmallow
b) Nougat
c) Oreo
d) Lollipop
Answer: a) Marshmallow
 Android 12 introduced which UI redesign?
a) Material Design
b) Material You
c) Holo Theme
d) Dynamic Layouts
Answer: b) Material You
 Which Android version was optimized for foldable devices?
a) Android 10
b) Android 9
c) Android 11
d) Android 12
Answer: c) Android 11
 What is the significance of Android 8 (Oreo)?
a) App permissions
b) Picture-in-Picture mode
c) Adaptive Battery
d) Foldable screen support
Answer: b) Picture-in-Picture mode
 Which Android version is associated with the codename "Cupcake"?
a) Android 1.1
b) Android 1.5
c) Android 1.6
d) Android 2.0
Answer: b) Android 1.5
 Which Android version introduced system-wide dark mode?
a) Pie
b) Oreo
c) Android 10
d) Android 11
Answer: c) Android 10
 What is the Android version released in 2021?
a) Android 11
b) Android 12
c) Android 13
d) Android Q
Answer: b) Android 12
 Which Android version introduced the concept of app widgets?
a) Cupcake
b) Donut
c) Eclair
d) Froyo
Answer: a) Cupcake
 Why is Android preferred by developers?
a) Closed-source environment
b) High level of app restrictions
c) Open-source and highly customizable
d) Lack of cross-platform support
Answer: c) Open-source and highly customizable
 What makes Android suitable for mobile devices?
a) It supports Windows applications.
b) It is optimized for low-power, resource-constrained environments.
c) It runs only on Google hardware.
d) It is exclusive to high-end devices.
Answer: b) It is optimized for low-power, resource-constrained
environments.
 Which of the following is NOT a reason for Android's popularity?
a) Large developer community
b) Open-source nature
c) High hardware requirements
d) Broad device compatibility
Answer: c) High hardware requirements
 Android supports multiple programming languages. Which one is the
primary language?
a) C++
b) Python
c) Java
d) Ruby
Answer: c) Java
 Which feature of Android helps reduce dependency on proprietary
software?
a) App Store
b) Linux Kernel
c) Hardware abstraction
d) Cloud services
Answer: b) Linux Kernel
 What is the lowest layer of Android architecture?
a) Android Runtime
b) Application Framework
c) Linux Kernel
d) Libraries
Answer: c) Linux Kernel
 Which layer of Android architecture contains libraries like WebKit and
OpenGL?
a) Libraries
b) Application Framework
c) Android Runtime
d) Linux Kernel
Answer: a) Libraries
 What is the primary function of the Application Framework?
a) Hardware abstraction
b) Managing UI and app components
c) Running compiled code
d) Providing device drivers
Answer: b) Managing UI and app components
 Which component in Android architecture handles database
management?
a) Content Providers
b) Activity Manager
c) View System
d) Android Runtime
Answer: a) Content Providers
 Which component in Android architecture allows applications to
interact with one another?
a) Content Providers
b) Activity Manager
c) Application Framework
d) Android Runtime
Answer: a) Content Providers
 Android applications interact with which layer for user input and
rendering?
a) Libraries
b) Linux Kernel
c) Application Framework
d) Android Runtime
Answer: c) Application Framework
 What is the role of Dalvik Virtual Machine (DVM) in older Android
versions?
a) Managing hardware drivers
b) Running Java-based applications
c) Handling device resources
d) Storing app settings
Answer: b) Running Java-based applications
 Which layer in Android architecture ensures memory management?
a) Android Runtime
b) Linux Kernel
c) Application Framework
d) Libraries
Answer: b) Linux Kernel
 Which layer manages the communication between hardware and
software in Android?
a) Linux Kernel
b) Libraries
c) Application Framework
d) Android Runtime
Answer: a) Linux Kernel
 What makes Android highly customizable for manufacturers?
a) Open-source nature
b) Google Play Store
c) App permissions model
d) Multi-window support
Answer: a) Open-source nature
 Which Android feature allows running multiple apps simultaneously?
a) Multi-tasking
b) Android Runtime
c) App Widgets
d) Background Services
Answer: a) Multi-tasking
 Which of the following is NOT a feature of Android?
a) Open-source code
b) Fragmentation
c) Exclusive compatibility with Google services
d) Linux Kernel support
Answer: c) Exclusive compatibility with Google services
 What feature introduced in Android improves device security by
encrypting data?
a) App permissions model
b) Secure Boot
c) File-Based Encryption (FBE)
d) Device Management APIs
Answer: c) File-Based Encryption (FBE)
 What is an Android Activity?
a) Background service
b) Single screen with UI
c) Hardware feature
d) Database management component
Answer: b) Single screen with UI
 What method in the Activity lifecycle is used to initialize the activity?
a) onStart()
b) onPause()
c) onCreate()
d) onResume()
Answer: c) onCreate()
 What is the primary purpose of Android version names?
a) They indicate the hardware requirements.
b) They represent chronological updates to the system.
c) They differentiate desktop versions.
d) They symbolize kernel updates.
Answer: b) They represent chronological updates to the system.
 Which Android version introduced native split-screen mode?
a) Android 6.0 (Marshmallow)
b) Android 7.0 (Nougat)
c) Android 8.0 (Oreo)
d) Android 9.0 (Pie)
Answer: b) Android 7.0 (Nougat)
 Which of the following was introduced in Android 5.0 Lollipop?
a) Material Design
b) Foldable screen support
c) Smart Reply
d) Gesture Navigation
Answer: a) Material Design
 What is the default file system for Android devices?
a) NTFS
b) FAT32
c) EXT4
d) HFS+
Answer: c) EXT4
 Which Android version introduced Scoped Storage for improved
privacy?
a) Android 9 (Pie)
b) Android 10
c) Android 11
d) Android 12
Answer: b) Android 10
 What is the purpose of the Android SDK?
a) Hardware testing
b) Developing Android applications
c) Managing device hardware
d) Customizing the operating system
Answer: b) Developing Android applications
 Which component in the Android ecosystem allows developers to
publish their apps?
a) Android Studio
b) Play Store
c) Gradle
d) Emulator
Answer: b) Play Store
 Which tool in the Android ecosystem is used for debugging apps?
a) ADB (Android Debug Bridge)
b) APK Manager
c) Play Console
d) DVM
Answer: a) ADB (Android Debug Bridge)
 What is the role of the Play Console in the Android ecosystem?
a) Testing Android applications
b) Publishing and managing apps on Play Store
c) Writing Java code
d) Simulating hardware
Answer: b) Publishing and managing apps on Play Store
 Which Android development tool is specifically designed for user
interface design?
a) AVD Manager
b) Layout Editor
c) Gradle
d) Emulator
Answer: b) Layout Editor
 What is the key responsibility of the View System in Android?
a) Hardware interaction
b) Managing application resources
c) Drawing UI components
d) Running Java bytecode
Answer: c) Drawing UI components
 Which layer of the Android architecture directly interacts with hardware
components?
a) Android Runtime
b) Application Framework
c) Linux Kernel
d) Libraries
Answer: c) Linux Kernel
 What component of the Application Framework handles the application
life cycle?
a) Activity Manager
b) Content Provider
c) Resource Manager
d) Package Manager
Answer: a) Activity Manager
 Which part of the Android Runtime is used to execute applications?
a) Content Provider
b) DVM or ART
c) Resource Manager
d) Package Manager
Answer: b) DVM or ART
 What is the role of the Window Manager in Android?
a) Managing user permissions
b) Displaying user interfaces on the screen
c) Optimizing storage space
d) Executing application logic
Answer: b) Displaying user interfaces on the screen
 Which component in Android manages multimedia libraries?
a) Application Framework
b) Media Framework
c) Runtime Libraries
d) Linux Kernel
Answer: b) Media Framework
 What feature of Android allows users to customize their device?
a) Open-source development
b) Widgets and themes
c) Application Framework
d) Content Providers
Answer: b) Widgets and themes
 What makes Android compatible with a wide range of devices?
a) High hardware requirements
b) Open-source Linux Kernel
c) Limited device compatibility
d) Google Play restrictions
Answer: b) Open-source Linux Kernel
 Which feature in Android improves app security and privacy?
a) Background services
b) Secure Boot
c) Permission Model
d) Fragmentation
Answer: c) Permission Model
 What does Android’s open-source nature enable for developers?
a) Increased restrictions
b) Free customization and code modification
c) Closed proprietary features
d) Reduced app diversity
Answer: b) Free customization and code modification
 What is the first method called during an Activity’s lifecycle?
a) onCreate()
b) onResume()
c) onStart()
d) onDestroy()
Answer: a) onCreate()
 What method is called when an Activity is no longer visible?
a) onPause()
b) onStop()
c) onResume()
d) onRestart()
Answer: b) onStop()
 What is the purpose of the onDestroy() method?
a) Saving data
b) Cleaning up resources before Activity termination
c) Initializing Activity components
d) Rendering UI
Answer: b) Cleaning up resources before Activity termination
 Which Activity lifecycle method is called when an app comes to the
foreground?
a) onStart()
b) onCreate()
c) onResume()
d) onPause()
Answer: c) onResume()
 What is the Android Emulator used for?
a) Testing apps in a virtual environment
b) Managing app lifecycle
c) Compiling Java code
d) Debugging APK files
Answer: a) Testing apps in a virtual environment
 What feature in Android allows notification management?
a) Notification Manager
b) Content Provider
c) Package Manager
d) Fragmentation
Answer: a) Notification Manager
 What is the file format of Android application packages?
a) .exe
b) .zip
c) .apk
d) .tar.gz
Answer: c) .apk
 Which feature in Android helps to minimize battery usage?
a) Doze Mode
b) Multi-tasking
c) View System
d) Secure Boot
Answer: a) Doze Mode
 What is Android Studio?
a) An operating system for Android devices
b) An integrated development environment for Android apps
c) A tool to root Android devices
d) A version control system
Answer: b) An integrated development environment for Android apps
 What is the role of Gradle in Android development?
a) Debugging
b) Managing app dependencies and builds
c) Running virtual devices
d) Managing permissions
Answer: b) Managing app dependencies and builds

UNIT II Installation and configuration of Android


Environment (Weightage-6 marks)
 What does JDK stand for?
a) Java Development Kit
b) Java Deployment Kit
c) Java Debugging Kit
d) Java Design Kit
Answer: a) Java Development Kit
 What is the purpose of the Android SDK?
a) To debug Android devices
b) To develop Android applications
c) To manage Android updates
d) To run Android applications
Answer: b) To develop Android applications
 Which programming language is primarily supported by the Android
SDK?
a) Python
b) Java
c) C++
d) Ruby
Answer: b) Java
 What is included in the Android SDK?
a) Hardware tools
b) Libraries, APIs, and debugging tools
c) Operating system updates
d) Emulator images only
Answer: b) Libraries, APIs, and debugging tools
 Which tool is used to compile and package Android applications?
a) JDK
b) Gradle
c) Dalvik
d) JVM
Answer: b) Gradle
 What does ADT stand for?
a) Android Development Toolkit
b) Application Design Toolkit
c) Android Debugging Tool
d) Android Deployment Tool
Answer: a) Android Development Toolkit
 Which IDE is commonly used for Android application development?
a) Eclipse
b) Android Studio
c) Visual Studio
d) NetBeans
Answer: b) Android Studio
 What is the main function of ADT?
a) Managing device hardware
b) Simplifying Android app development in Eclipse
c) Monitoring network traffic
d) Updating Android versions
Answer: b) Simplifying Android app development in Eclipse
 Which ADT plugin integrates Android SDK with Eclipse?
a) Android Debugger
b) Gradle Plugin
c) ADT Plugin
d) Emulator Plugin
Answer: c) ADT Plugin
 Why is ADT no longer used in modern Android development?
a) It lacks debugging tools.
b) Android Studio has replaced it.
c) It doesn’t support Java.
d) It is only for testing applications.
Answer: b) Android Studio has replaced it.
 What is the purpose of an Android Virtual Device (AVD)?
a) To test apps on physical devices
b) To emulate an Android environment for testing
c) To debug Java code
d) To deploy apps to the Play Store
Answer: b) To emulate an Android environment for testing
 Which file format is used for AVD snapshots?
a) .img
b) .avd
c) .apk
d) .exe
Answer: a) .img
 What is an emulator in Android development?
a) A physical testing tool
b) A virtual simulation of an Android device
c) A debugging software
d) A package manager for apps
Answer: b) A virtual simulation of an Android device
 Which tool manages AVDs in Android Studio?
a) AVD Manager
b) Android SDK Manager
c) Gradle
d) Debugging Console
Answer: a) AVD Manager
 Which option allows customizing an AVD’s specifications?
a) Layout Editor
b) AVD Configuration Settings
c) Android Debug Bridge
d) Package Manager
Answer: b) AVD Configuration Settings
 What is the primary difference between an emulator and a physical
device for testing?
a) Emulators are slower than physical devices.
b) Emulators support fewer Android versions.
c) Emulators can only test apps in debug mode.
d) Emulators do not support hardware acceleration.
Answer: a) Emulators are slower than physical devices.
 What is the main difference between JVM and DVM?
a) DVM uses .apk files, while JVM uses .class files.
b) DVM executes bytecode for Android, while JVM is for desktop
applications.
c) JVM runs faster than DVM.
d) DVM is only used for Java 8.
Answer: b) DVM executes bytecode for Android, while JVM is for
desktop applications.
 What replaced DVM in newer Android versions?
a) JVM
b) ART (Android Runtime)
c) Gradle
d) AVD
Answer: b) ART (Android Runtime)
 Which tool converts Java bytecode into Dalvik bytecode?
a) AAPT
b) DEX Compiler
c) JDK
d) Gradle
Answer: b) DEX Compiler
 Why was ART introduced to replace DVM?
a) Faster execution with Ahead-of-Time (AOT) compilation
b) Better compatibility with physical devices
c) Smaller memory usage
d) Support for older Android versions
Answer: a) Faster execution with Ahead-of-Time (AOT) compilation
 Which tool is required before installing Android Studio?
a) Visual Studio Code
b) JDK
c) Gradle
d) Emulator
Answer: b) JDK
 What file format is used to download Android Studio?
a) .exe for Windows
b) .apk for MacOS
c) .zip for Linux
d) .tar.gz for iOS
Answer: a) .exe for Windows
 Which step follows the installation of Android Studio?
a) Configuring SDK Manager
b) Installing Gradle Plugin
c) Creating a new emulator
d) Uploading an APK file
Answer: a) Configuring SDK Manager
 Which Android tool manages dependencies?
a) ADB
b) Gradle
c) Emulator
d) ADT
Answer: b) Gradle
 What is the default directory for SDK installation in Windows?
a) C:/Android
b) C:/Users/AndroidStudioProjects
c) C:/Program Files/Android/sdk
d) C:/AndroidApps
Answer: c) C:/Program Files/Android/sdk
 What is the first method called during an Android app lifecycle?
a) onCreate()
b) onResume()
c) onStart()
d) onStop()
Answer: a) onCreate()
 Which lifecycle method is called when an activity becomes visible?
a) onStart()
b) onPause()
c) onResume()
d) onDestroy()
Answer: a) onStart()
 What happens in the onPause() method?
a) Resources are initialized.
b) Activity transitions to the background.
c) Activity is terminated.
d) Activity layout is created.
Answer: b) Activity transitions to the background.
 What is the purpose of the onDestroy() method?
a) To save user data
b) To release resources before activity termination
c) To start the activity
d) To make the app responsive
Answer: b) To release resources before activity termination
 Which lifecycle method is called when the app is brought back to the
foreground?
a) onRestart()
b) onPause()
c) onStop()
d) onResume()
Answer: d) onResume()
 Which Android lifecycle method is called when an activity is partially
visible?
a) onPause()
b) onStop()
c) onResume()
d) onDestroy()
Answer: a) onPause()
 What triggers the onRestart() method in an Android activity?
a) Starting an activity for the first time
b) Bringing a stopped activity back to the foreground
c) Pausing an activity
d) Destroying an activity
Answer: b) Bringing a stopped activity back to the foreground
 In which phase does the app interact with the user?
a) onStart()
b) onResume()
c) onPause()
d) onStop()
Answer: b) onResume()
 Which lifecycle method is called before the activity becomes visible?
a) onCreate()
b) onStart()
c) onPause()
d) onDestroy()
Answer: b) onStart()
 What happens if the onDestroy() method is not overridden in an
activity?
a) The activity will crash.
b) The activity will terminate normally.
c) The app will remain in memory.
d) The system will throw an exception.
Answer: b) The activity will terminate normally.
 What is the primary purpose of the onSaveInstanceState() method?
a) To restore the app layout
b) To save temporary data before the activity is destroyed
c) To restart the app
d) To destroy resources
Answer: b) To save temporary data before the activity is destroyed
 Which lifecycle method is skipped when the activity is force-stopped?
a) onPause()
b) onStop()
c) onDestroy()
d) onRestart()
Answer: c) onDestroy()
 What is the correct order of lifecycle methods when an activity is
launched?
a) onCreate(), onStart(), onResume()
b) onStart(), onResume(), onCreate()
c) onPause(), onResume(), onCreate()
d) onStop(), onDestroy(), onRestart()
Answer: a) onCreate(), onStart(), onResume()
 What is the purpose of the onPause() method?
a) To close the app
b) To release system resources
c) To transition the activity to a stopped state
d) To pause app interactions while keeping it partially visible
Answer: d) To pause app interactions while keeping it partially visible
 Which method is called when the app transitions from the background
to the foreground?
a) onResume()
b) onRestart()
c) onCreate()
d) onStart()
Answer: b) onRestart()
 Which command-line tool is used for debugging Android applications?
a) ADB (Android Debug Bridge)
b) Android Emulator
c) Gradle Wrapper
d) AVD Manager
Answer: a) ADB (Android Debug Bridge)
 What is the primary function of the Android SDK Manager?
a) To compile Java code
b) To manage Android libraries and updates
c) To debug apps
d) To create virtual devices
Answer: b) To manage Android libraries and updates
 Which tool is used to convert Java files into .apk files?
a) JDK Compiler
b) Gradle Build System
c) DEX Compiler
d) Android Emulator
Answer: c) DEX Compiler
 What is the purpose of the ‘Platform-Tools’ package in the Android SDK?
a) To manage Android Studio updates
b) To compile and debug Android apps
c) To simulate Android devices
d) To test app performance
Answer: b) To compile and debug Android apps
 Which option must be enabled on a physical device to test apps via
ADB?
a) Developer Options
b) Debugging Console
c) USB Debugging
d) APK Installer
Answer: c) USB Debugging
 What is the purpose of Gradle in Android Studio?
a) To manage project dependencies and build processes
b) To simulate virtual devices
c) To debug apps on real devices
d) To edit Android layouts
Answer: a) To manage project dependencies and build processes
 What is the default extension of Android application files?
a) .exe
b) .apk
c) .avd
d) .dex
Answer: b) .apk
 Which of the following is NOT required for installing Android Studio?
a) JDK
b) Android Emulator
c) Python Interpreter
d) Gradle Build System
Answer: c) Python Interpreter
 How do you verify the correct installation of Android Studio?
a) Run the "hello world" app on an emulator.
b) Launch Android SDK Manager.
c) Install a new virtual device.
d) Test USB debugging on a physical device.
Answer: a) Run the "hello world" app on an emulator.
 What is the role of an IDE in Android development?
a) To emulate Android hardware
b) To provide tools for app development, debugging, and testing
c) To host Android applications
d) To publish apps to the Play Store
Answer: b) To provide tools for app development, debugging, and
testing
 Which feature of DVM made it suitable for mobile devices?
a) High RAM usage
b) Register-based architecture
c) Stack-based architecture
d) Lack of bytecode conversion
Answer: b) Register-based architecture
 How does ART differ from DVM in terms of app execution?
a) ART uses Ahead-of-Time (AOT) compilation, while DVM uses Just-in-
Time (JIT) compilation.
b) ART uses Java, while DVM uses Kotlin.
c) DVM is faster than ART.
d) ART does not compile apps.
Answer: a) ART uses Ahead-of-Time (AOT) compilation, while DVM uses
Just-in-Time (JIT) compilation.
 What is the file extension of Dalvik Executable files?
a) .dex
b) .class
c) .apk
d) .avd
Answer: a) .dex
 Which Android version introduced ART?
a) Android 2.3 (Gingerbread)
b) Android 4.4 (KitKat)
c) Android 5.0 (Lollipop)
d) Android 3.0 (Honeycomb)
Answer: b) Android 4.4 (KitKat)
 What is the full form of DVM?
a) Device Virtual Machine
b) Dalvik Virtual Machine
c) Data Visualization Module
d) Debugging Virtual Machine
Answer: b) Dalvik Virtual Machine
 Which tool allows you to test Android apps without a physical device?
a) Emulator
b) Debugger
c) Gradle Wrapper
d) Package Manager
Answer: a) Emulator
 Which phase is NOT part of the Android activity lifecycle?
a) onExecute()
b) onPause()
c) onStop()
d) onDestroy()
Answer: a) onExecute()
 Which lifecycle method is typically used to release resources like
database connections?
a) onPause()
b) onStop()
c) onDestroy()
d) onCreate()
Answer: c) onDestroy()
 Which Android Studio tool is used to monitor app performance?
a) Profiler
b) AVD Manager
c) Gradle Console
d) Layout Editor
Answer: a) Profiler
 What does the SDK Manager in Android Studio allow you to do?
a) Install or update Android platform versions and tools
b) Simulate Android hardware
c) Write Kotlin code
d) Deploy apps to the Play Store
Answer: a) Install or update Android platform versions and tools

UNIT III Fundamental of UI Components and


Layouts(Weightage-8 marks)

 Which directory in an Android project stores XML files for the user
interface?
a) drawable
b) values
c) layout
d) res
Answer: c) layout
 What is stored in the values directory of an Android project?
a) Image resources
b) XML files for strings, colors, and dimensions
c) Layout files
d) Manifest files
Answer: b) XML files for strings, colors, and dimensions
 Which file defines the application's metadata, such as package name
and permissions?
a) MainActivity.java
b) AndroidManifest.xml
c) styles.xml
d) build.gradle
Answer: b) AndroidManifest.xml
 Where are the Java or Kotlin source code files located in an Android
project?
a) res directory
b) java or src directory
c) layout directory
d) gradle directory
Answer: b) java or src directory
 Which directory is used for storing app icons and image resources?
a) drawable
b) layout
c) mipmap
d) assets
Answer: a) drawable
 Which folder is responsible for the app's compiled code?
a) lib
b) bin
c) gen
d) build
Answer: d) build
 What is the role of the assets directory?
a) To store user interface components
b) To store non-compiled files like fonts and raw files
c) To store Java classes
d) To manage build configurations
Answer: b) To store non-compiled files like fonts and raw files
 Which file contains the Gradle build configuration for the app module?
a) build.xml
b) build.gradle
c) AndroidManifest.xml
d) settings.gradle
Answer: b) build.gradle
 Which directory contains the localization files for an Android app?
a) raw
b) values
c) assets
d) res
Answer: b) values
 What is the purpose of the proguard-rules.pro file in an Android
project?
a) To define app layouts
b) To optimize and obfuscate code during release builds
c) To manage resources
d) To handle lifecycle callbacks
Answer: b) To optimize and obfuscate code during release builds
 Which is NOT a fundamental screen component in Android?
a) TextView
b) Button
c) ProgressBar
d) FragmentManager
Answer: d) FragmentManager
 Which component is used to display a single line of editable text?
a) TextView
b) EditText
c) ImageView
d) CheckBox
Answer: b) EditText
 What is the role of the ImageView component?
a) To display images in the app
b) To capture user input
c) To show loading progress
d) To create layouts
Answer: a) To display images in the app
 Which component is used for clickable items that trigger actions?
a) TextView
b) Button
c) RadioButton
d) ImageView
Answer: b) Button
 Which component is used for user selection between multiple options?
a) ProgressBar
b) Switch
c) Spinner
d) LinearLayout
Answer: c) Spinner
 What does a ProgressBar indicate in an app?
a) Static content display
b) Current progress of a task
c) Layout management
d) Dropdown menu options
Answer: b) Current progress of a task
 Which attribute is mandatory for defining a UI component in XML?
a) padding
b) id
c) layout_width and layout_height
d) background
Answer: c) layout_width and layout_height
 Which component allows the user to select one or more items from a
group?
a) RadioButton
b) CheckBox
c) Spinner
d) SeekBar
Answer: b) CheckBox
 What is the default orientation of a LinearLayout?
a) Vertical
b) Horizontal
c) Undefined
d) Grid-based
Answer: a) Vertical
 Which component is used for organizing items into scrollable lists?
a) RecyclerView
b) LinearLayout
c) RelativeLayout
d) ScrollView
Answer: a) RecyclerView
 Which layout arranges its children in a single row or column?
a) LinearLayout
b) RelativeLayout
c) FrameLayout
d) AbsoluteLayout
Answer: a) LinearLayout
 What is the primary drawback of AbsoluteLayout?
a) Complex UI design
b) Fixed positioning, which does not adapt to different screen sizes
c) Lack of support for nested layouts
d) High memory usage
Answer: b) Fixed positioning, which does not adapt to different screen
sizes
 Which layout allows overlapping of child elements?
a) LinearLayout
b) FrameLayout
c) RelativeLayout
d) TableLayout
Answer: b) FrameLayout
 Which layout uses a table-like structure for UI design?
a) TableLayout
b) GridLayout
c) RelativeLayout
d) FrameLayout
Answer: a) TableLayout
 Which layout allows child elements to be positioned relative to each
other or the parent?
a) RelativeLayout
b) LinearLayout
c) FrameLayout
d) TableLayout
Answer: a) RelativeLayout
 Which layout was introduced to simplify UI design with flexible grid
positioning?
a) AbsoluteLayout
b) GridLayout
c) TableLayout
d) LinearLayout
Answer: b) GridLayout
 What attribute is used to specify the alignment of children in a
LinearLayout?
a) gravity
b) layout_gravity
c) orientation
d) padding
Answer: a) gravity
 What is the default alignment in a RelativeLayout?
a) Top-left corner
b) Center
c) Right-aligned
d) Bottom-aligned
Answer: a) Top-left corner
 Which layout is ideal for UI components that need to stretch to fill the
parent?
a) FrameLayout
b) RelativeLayout
c) ConstraintLayout
d) AbsoluteLayout
Answer: c) ConstraintLayout
 Which layout was deprecated due to poor scalability and adaptability?
a) RelativeLayout
b) AbsoluteLayout
c) FrameLayout
d) LinearLayout
Answer: b) AbsoluteLayout
 What is the function of a ScrollView?
a) To display images
b) To allow scrolling of a long UI
c) To manage relative positioning
d) To organize child elements into a table
Answer: b) To allow scrolling of a long UI
 Which layout is used to design flexible, multi-device UIs?
a) GridLayout
b) ConstraintLayout
c) AbsoluteLayout
d) TableLayout
Answer: b) ConstraintLayout
 Which directory in an Android project contains resource files used to
define user interface strings?
a) layout
b) raw
c) values
d) assets
Answer: c) values
 What is the purpose of the res/drawable directory?
a) To store images and graphic resources
b) To hold string resources
c) To store XML files for layouts
d) To manage build configurations
Answer: a) To store images and graphic resources
 Which file is essential for launching an Android application?
a) MainActivity.java
b) styles.xml
c) AndroidManifest.xml
d) strings.xml
Answer: c) AndroidManifest.xml
 Which of the following is NOT part of an Android app's directory
structure?
a) assets
b) classes
c) res
d) libs
Answer: b) classes
 What is stored in the res/raw folder?
a) Media files like videos or MP3s
b) Layout files
c) Precompiled Java files
d) XML configuration files
Answer: a) Media files like videos or MP3s
 Which directory is specifically used for high-density screen resources?
a) res-mdpi
b) res-hdpi
c) res-xhdpi
d) res-xxhdpi
Answer: d) res-xxhdpi
 Which of the following is a layout manager in Android?
a) ProgressBar
b) FrameLayout
c) TextView
d) Button
Answer: b) FrameLayout
 Which UI component is used to capture touch inputs for gestures?
a) ScrollView
b) GestureDetector
c) LinearLayout
d) GridLayout
Answer: b) GestureDetector
 What is the main difference between ListView and RecyclerView?
a) RecyclerView is deprecated
b) RecyclerView supports ViewHolder for performance
c) ListView supports better animations
d) ListView requires less memory than RecyclerView
Answer: b) RecyclerView supports ViewHolder for performance
 Which component is used to display a circular loading indicator?
a) ProgressBar
b) CircularImageView
c) ImageButton
d) Spinner
Answer: a) ProgressBar
 Which attribute is used to make a TextView editable?
a) android:clickable
b) android:editable
c) android:inputType
d) android:focusable
Answer: c) android:inputType
 Which component would you use for a menu that pops up upon a
button click?
a) Dialog
b) PopupMenu
c) Spinner
d) ScrollView
Answer: b) PopupMenu
 What is the use of android:hint in an EditText field?
a) To display an error message
b) To provide a default value
c) To show a placeholder text
d) To change the font size
Answer: c) To show a placeholder text
 Which layout component is NOT scrollable by default?
a) RecyclerView
b) ScrollView
c) LinearLayout
d) ListView
Answer: c) LinearLayout
 Which UI component is ideal for creating toggle switches?
a) Button
b) CheckBox
c) Switch
d) Spinner
Answer: c) Switch
 Which attribute is used to align components within a LinearLayout?
a) android:layout_gravity
b) android:layout_align
c) android:layout_weight
d) android:layout_margin
Answer: a) android:layout_gravity
 Which layout organizes UI elements in a tabular format?
a) FrameLayout
b) TableLayout
c) RelativeLayout
d) LinearLayout
Answer: b) TableLayout
 What does the layout_weight attribute do in a LinearLayout?
a) Specifies the height of the component
b) Distributes space among child elements
c) Aligns the component to the parent
d) Sets the padding of the layout
Answer: b) Distributes space among child elements
 Which attribute is used to define margins in a layout?
a) android:padding
b) android:spacing
c) android:margin
d) android:alignment
Answer: c) android:margin
 Which layout arranges its children relative to the edges or each other?
a) ConstraintLayout
b) FrameLayout
c) RelativeLayout
d) TableLayout
Answer: c) RelativeLayout
 What is the primary advantage of ConstraintLayout?
a) Fixed positioning
b) Lightweight memory usage
c) Flexible positioning for multi-device design
d) Allows overlapping of child elements
Answer: c) Flexible positioning for multi-device design
 What happens when two child components in a LinearLayout have the
same layout_weight?
a) One takes precedence
b) They share space equally
c) The second one gets more space
d) It creates an error
Answer: b) They share space equally
 Which layout type is deprecated due to its poor scalability?
a) AbsoluteLayout
b) GridLayout
c) ConstraintLayout
d) TableLayout
Answer: a) AbsoluteLayout
 Which layout is best suited for overlapping UI components?
a) FrameLayout
b) RelativeLayout
c) TableLayout
d) ConstraintLayout
Answer: a) FrameLayout
 Which layout requires a unique ID for each component for relative
positioning?
a) RelativeLayout
b) FrameLayout
c) TableLayout
d) AbsoluteLayout
Answer: a) RelativeLayout
 Which of the following is NOT a valid layout in Android?
a) AbsoluteLayout
b) CardLayout
c) TableLayout
d) FrameLayout
Answer: b) CardLayout
 Which layout is used for dividing a UI into equal-sized grids?
a) TableLayout
b) GridLayout
c) ConstraintLayout
d) FrameLayout
Answer: b) GridLayout
 Which attribute of a LinearLayout defines the direction of child
components?
a) android:orientation
b) android:layout_gravity
c) android:alignment
d) android:scrolling
Answer: a) android:orientation

Advanced and Scenario-based MCQs

Unit I: Introduction to Android Operating System

 Which Android version introduced the Material Design guidelines?


a) Android 4.4 KitKat
b) Android 5.0 Lollipop
c) Android 6.0 Marshmallow
d) Android 7.0 Nougat
Answer: b) Android 5.0 Lollipop
 You are developing an app for Android 4.2 (Jelly Bean), but the app
crashes on Android 8.0 (Oreo). Which is the most likely cause?
a) The app does not support the newer permissions model in Android
8.0.
b) The app is incompatible with the new UI guidelines.
c) Android 8.0 does not support Java, causing the app to crash.
d) The app has a memory leak issue on Android 8.0.
Answer: a) The app does not support the newer permissions model in
Android 8.0.
 If an Android device is running low on system memory, what Android
feature helps optimize performance?
a) Android Virtual Device
b) Dalvik Virtual Machine (DVM)
c) Low memory killer
d) AsyncTask
Answer: c) Low memory killer

Unit II: Installation and Configuration of Android Environment

 What could happen if the Android SDK is not correctly configured in


Android Studio during app development?
a) The app will run but will have slower performance.
b) The app will fail to build, and the IDE will throw errors.
c) The app will run without any issues, but updates won't be received.
d) Only Java-related functionalities will work.
Answer: b) The app will fail to build, and the IDE will throw errors.
 Which issue can arise if the Android Virtual Device (AVD) does not
match the physical device configuration (e.g., screen size, API level)?
a) The app might crash on launch.
b) The app will not compile.
c) The UI might look incorrect or break.
d) The app will be very slow and unresponsive.
Answer: c) The UI might look incorrect or break.
 You want to debug an Android app on an emulator. What is the most
effective method to simulate different screen sizes?
a) Use Android Virtual Device (AVD) with different device
configurations.
b) Adjust the screen resolution in the device settings.
c) Use the Device Configuration option in Android Studio.
d) Use TextView and ImageView to resize the UI.
Answer: a) Use Android Virtual Device (AVD) with different device
configurations.
 Which Android lifecycle method is called when the activity is no longer
visible to the user but still in memory?
a) onStop()
b) onPause()
c) onDestroy()
d) onRestart()
Answer: a) onStop()

Unit III: Fundamentals of UI Components and Layouts

 While designing a UI for an Android application, you are using a


RelativeLayout for complex positioning. What is the major drawback of
using RelativeLayout in comparison to ConstraintLayout?
a) RelativeLayout is less efficient when there are many components.
b) RelativeLayout supports fewer attributes for positioning.
c) RelativeLayout is deprecated and no longer supported.
d) RelativeLayout does not allow overlapping views.
Answer: a) RelativeLayout is less efficient when there are many
components.
 If you use layout_weight in a LinearLayout, which of the following best
describes how the weight values are distributed among child elements?
a) Weight values are evenly distributed unless explicitly defined.
b) Weight values are ignored if the parent layout has wrap_content as
its width.
c) Weight values determine the pixel width based on screen resolution.
d) Weight values define the visibility of child elements.
Answer: a) Weight values are evenly distributed unless explicitly
defined.
 In an Android app, you need to ensure that a specific layout will be
responsive on different screen sizes (small, medium, and large). Which
layout would you prefer to use for this purpose?
a) TableLayout
b) LinearLayout
c) RelativeLayout
d) ConstraintLayout
Answer: d) ConstraintLayout
 You are using a LinearLayout with android:orientation="horizontal".
Which attribute will help align the child elements within the layout?
a) android:layout_margin
b) android:layout_gravity
c) android:gravity
d) android:padding
Answer: b) android:layout_gravity
 If you place multiple buttons in a FrameLayout, which of the following
would be the outcome?
a) Buttons will be placed in a grid format.
b) Buttons will overlap on top of each other.
c) Buttons will be aligned from top to bottom.
d) Buttons will be aligned from left to right.
Answer: b) Buttons will overlap on top of each other.
 Which of the following layout managers is best for designing a UI where
the child views should automatically adjust to the size of the screen
(e.g., in a responsive design)?
a) TableLayout
b) GridLayout
c) ConstraintLayout
d) FrameLayout
Answer: c) ConstraintLayout
 Which layout should be used to align child elements in a column or row
where each element can have a flexible size?
a) RelativeLayout
b) LinearLayout
c) GridLayout
d) FrameLayout
Answer: b) LinearLayout
 When should you use AbsoluteLayout in Android?
a) When you want a flexible layout that adjusts automatically.
b) Only when precise positioning of elements is required in terms of
pixels.
c) Only for small apps with limited screen sizes.
d) AbsoluteLayout should not be used in modern Android development.
Answer: b) Only when precise positioning of elements is required in
terms of pixels.
 Which layout would you use to create a form with labels on the left and
input fields on the right, while ensuring it adapts to different screen
sizes?
a) LinearLayout
b) RelativeLayout
c) GridLayout
d) TableLayout
Answer: d) TableLayout
 You have a TextView inside a LinearLayout with
android:layout_width="wrap_content". What happens if the
LinearLayout has android:orientation="vertical"?
a) The TextView will be stretched to the full width of the screen.
b) The TextView will wrap to its content width, regardless of screen size.
c) The TextView will be hidden if it exceeds the layout width.
d) The TextView will display in full screen width due to default settings.
Answer: b) The TextView will wrap to its content width, regardless of
screen size.

You might also like