Online Exam Quiz

questionQuestion  1 to 30

What does the term "ViewModel" refer to in Android Architecture Components?

  • A UI layout
  • A component for managing UI-related data
  • A background process
  • A system service
Mark for review

What is the use of an Intent in Android?

  • To pass data between activities
  • To draw the UI
  • To handle background tasks
  • To manage the lifecycle
Mark for review

What is ANR in Android?

  • Android Non-Responsive
  • Application Not Running
  • Android Not Running
  • Application Not Responding
Mark for review

How can you access a view by its id in Android?

  • findViewById()
  • getViewById()
  • findView()
  • getView()
Mark for review

What is the purpose of the 'Looper' class in Android?

  • To manage threads
  • To manage message queues for threads
  • To handle UI rendering
  • To manage network requests
Mark for review

How can you avoid ANR in Android?

  • Using background threads
  • Using heavy tasks on main thread
  • Blocking UI thread
  • Ignoring system events
Mark for review

Mark for review

What is the purpose of the Gradle build system in Android development?

  • To compile source code
  • To manage dependencies
  • To provide a testing framework
  • All of the above
Mark for review

Which layout is best for a complex UI with nested elements?

  • LinearLayout
  • RelativeLayout
  • ConstraintLayout
  • FrameLayout
Mark for review

What is the purpose of a ViewGroup in Android?

  • To handle background tasks
  • To provide navigation
  • To store UI components
  • To display data
Mark for review

How can you persist data in Android?

  • SharedPreferences
  • Files
  • SQLite Database
  • All of the above
Mark for review

Which of the following is NOT a lifecycle method of an activity in Android?

  • onCreate()
  • onPause()
  • onResume()
  • onTerminate()
Mark for review

Mark for review

What does the 'Parcelable' interface in Android do?

  • Serializes objects
  • Allows objects to be serialized and passed between activities
  • Manages app resources
  • Handles UI events
Mark for review

Which component is NOT part of the Android application structure?

  • Activities
  • Fragments
  • Intents
  • Servers
Mark for review

What is the default value of a boolean variable in Java?

  • TRUE
  • FALSE
  • null
  • 0
Mark for review

Which method is called when an activity is started for the first time?

  • onStart()
  • onCreate()
  • onResume()
  • onDestroy()
Mark for review

Which attribute is used to specify the id of a view in Android?

  • id
  • view_id
  • android
  • viewid
Mark for review

How do you define a layout in XML for an Android application?

  • <layout>
  • <view>
  • <design>
  • <xml>
Mark for review

What is an Activity in Android?

  • A screen representation
  • A background service
  • A type of Broadcast Receiver
  • An XML layout file
Mark for review

How is a Toast message displayed in Android?

  • Toast.makeText()
  • Toast.show()
  • Toast.display()
  • Toast.create()
Mark for review

What does the term "Fragment" refer to in Android development?

  • A UI component
  • A background service
  • A layout manager
  • A data storage option
Mark for review

Which method is used to start an activity for a result in Android?

  • startActivity()
  • startActivityForResult()
  • startResultActivity()
  • startForResultActivity()
Mark for review

What is the use of the ProGuard tool in Android development?

  • To manage app dependencies
  • To optimize and obfuscate the code
  • To provide analytics
  • To handle UI rendering
Mark for review

How can you define a new style in Android?

  • In strings.xml
  • In styles.xml
  • In layout.xml
  • In colors.xml
Mark for review

How do you implement a BroadcastReceiver in Android?

  • By extending the BroadcastReceiver
  • By implementing the BroadcastReceiver
  • By extending the Receiver
  • By implementing the Receiver
Mark for review

How can you perform network operations in Android?

  • Using AsyncTask
  • Using Handler
  • Using IntentService
  • All of the above
Mark for review

How can you handle different screen sizes in Android?

  • Use of flexible layouts
  • Fixed layouts
  • Using pixel-based dimensions
  • Ignoring the issue
Mark for review

Which method is used to close an activity in Android?

  • finish()
  • stop()
  • close()
  • destroy()
Mark for review

Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review