android_6
android_6
1) Webkit
2) OpenGL
3) SQLite
4) Dalvik
5) OpenUI
A: 3, 4 ,5
A: LinearLayout
Which widget view could be used to make a clickable object with image content?
A: ImageButton, ImageView
An activity contains the following code in onCreate() . What will happen when this code is
executed, if the intent property is null?
A: The app will not crash because the extras property is accessed safely using ?.
What is the language to program Android natively (select all correct answers)?
A: Java, Kotlin, C/C++
Where to configure the home activity - the first activity to be run in your application?
A: in the AndroidManifest.xml
What are lambdas in Kotlin?
A: A lambda is an expression that describes a function. But instead of declaring a named
function, you declare a function that has no name
Both Toast and Logcat can be used to debug the program, which expression bellow is
wrong?
A: Logcat only display information that developer logs out
If you activity has the name: SampleActivity, what is the name of the binding class which is
generated automatically by Android when you configure your application as data binding
enable
A: SampleActivityBinding
Inflate the activity's layout: The setContentView() method is called to inflate the activity's layout
into the activity's view hierarchy. This means that the UI elements that are defined in the layout file are
created and added to the activity's view hierarchy.
Initialize the activity's data: If the activity needs to load any data from the user or from the network, it
can do so in the onCreate() method. This is because the activity has not yet been started, so it is
safe to perform any necessary data loading without worrying about the user's interaction with the
activity.
A: Gradle is an automated build system used by Android Studio to build your apps. You can
configure Android-specific options for your project in your app’s build.gradle file.
What is the function to open new activity from the current activity?
A: startActivity
A: android.view.TextView
Which value of the property scaleType of the ImageView allows us to keep remaining the
aspect ratio (the image will not be croped)?
A: centerInside
Select all answers that are true for this XML layout when displayed on the screen
A: TextView A appears vertically stacked on top of TextView B.
The starting edge of TextView A is aligned to the starting edge of the parent view.
How to handle the event that user press the button and hold for a while?
A: setOnLongClickListener
If we have some buttons in one Activity, and all the buttons set the event onClickListener to
the Activity by calling setOnClickListener(this) . So, in the callback function onClick of the
Activity, how do you know which button is clicked
A: onPause() because the activity is still displayed, but no longer has focus.
True or False: onCreateView() is only called once for a fragment’s entire lifecycle
A: True
A: finish()
A: To call implicit, you have to know the class name of the destination activity
A: Navigation between fragments allows for more sophisticated user interface patterns, such
as tab bars.. Using multiple fragments within an activity allows for an adaptive layout across
multiple screen sizes. The same fragments can be reused across multiple activities.
intent.putExtra("sms_body", "hello")
startActivity(intent)
A: Intent.ACTION_SENDTO
When is the current Activity reset, i.e., the onCreate callback is called again?
A: user rotates the phone. user changes the language of the phone. user presses the home
button and opens another app
Suppose we write an application to survey the hobby of people (there are 5 hobbies to be
surveyed), one person may have several hobbies. Which input controls is suitable for this
purpose?
A: Checkbox
A: Open Source and Cross-Platform. Large Developer Community. Java and Kotlin Support.
Cost-Effectiveness