Android Quiz #1
You may lie here if you're shy ;)
Assuming that we have resources like res/drawable-anydpi/foo.xml and res/drawable-xxhdpi/foo.png. Which resource will be chosen if the app is launched on a device with xxhdpi density?
app will crash
project won’t compile
Which methods are provided by Kotlin data classes?
all of them
Which class is the common superclass for all classes in Kotlin?
What’s going to happen if a Service is started using startService(Intent) method, then a user moves the app to the background and waits a few minutes?
the Service will continue to run
the Service will be paused and then resumed when we reopen the app
the Service will be killed by the System since Android 8.0
the Service will be killed by the System
What does it mean that a notification is ongoing?
it is visible to the user
it cannot be dismissed by the user
it will be displayed as a heads-up notification
it will be displayed on a lock screen
What may the Handler class be used for?
communication between threads
to move code execution from working thread to UI thread
to send Message objects to the Handler's thread
to execute a piece of code after given delay
Assuming we have two following layouts res/layout-sw600dp/main_activity.xml and res/layout/main_activity.xml, which combinations will cause the app to use the layout from sw600dp folder?
device width 720dp, device height 1200dp, portrait orientation
device width 500dp, device height 1000dp, landscape orientation
device width 500dp, device height 1000dp, portrait orientation
device width 720dp, device height 1200dp, landscape orientation
Which methods will ALWAYS cause the View.draw() method to be called?
Assume we have the following property `val value: Int`. Is it possible that the property returns different integer value every time it is being accessed?
No, as `val` cannot be reassigned
Yes, through a custom getter
Yes, through a custom setter
What is the best programming language?
Assuming you have an app with minSdk 19. Does writing data to external storage folder, accessed by getExternalFilesDir() method, require WRITE_EXTERNAL_STORAGE permission?
Will onPause() method be called in Activity A after opening Activity B from Activity A?
Page 1 of 1
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google.
Terms of Service