android_3
android_3
ai
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
31 32 33 34 35
36 37 38 39 40
41 42 43 44 45
Unit
Câu hỏi #f2514b
2 điểm (không tích lũy, không hiển thị kết quả
val address =
Uri Answer:
.parse("https://soict.hust.edu.vn")
address Answer:
startActivity(intent)
Gửi
To call implicit, you have to know the class name of the destination activity
Android runtime will open the app chooser if there exists more than one candidate for the implicit intent
Android runtime receive the requests and try to find the matched application
Android runtime keeps list of application registering to run the implicit intent
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 1/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
Gửi
LinearLayout
RelativeLayout
android.widget.view
ConstrainLayout
ViewGroup
Gửi
An implicit intent always results in the system asking the user which app to open
Explicit intents require you to specify the class of the activity you want to show.
Both implicit and explicit intents allow your app to launch another activity.
Gửi
They can be extended by subclasses and implementations can be provided for abstract members of the class.
Gửi
What is the language to program Android natively (select all correct answers)?
Java
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 2/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
Kotlin
C/C++
Gửi
In case the activity has too many input controls so that the layout height is over the height of the phone's screen, which ViewGroup should be used?
ScrollView
LinearLayout
HorizontalScrollView
VerticalScrollView
Gửi
The application must have compatibility with several different versions of Android
Gửi
An activity contains the following code in onCreate() . What will happen when this code is executed, if the intent property is null?
The app will not crash because the extras property is accessed safely using ?.
The app will not crash because the extras property is accessed unsafely using ?.
The app will crash because it attempted to access the extras property on a null object.
Gửi
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 3/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
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.
Frragment is more lightweight than ACtivity sothat we should use Fragment rather than
Gửi
Which widget view could be used to make a clickable object with image content?
Button
ImageButton
ImageView
Image
TextView
Gửi
Where to configure the home activity - the first activity to be run in your application?
in the AndroidManifest.xml
in the MainActivity.kt
Gửi
To make the EditText allows password characters (e.g., display * instead of the real character), you have to set the value of the inputType property
as (type your answer with case sensitive)
textPassword Answer:
Gửi
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 4/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
It is sufficient to provide a single bitmap image of your app icon in your project to make it appear high quality on a range of Android devices.
mdpi, hdpi, xhdpi, xxhdpi, and xxxhdpi are density qualifiers for resource directories to indicate that these are resources to be used on
devices with a specific screen density.
Adaptive icons are made up of a foreground and background layer, and an OEM mask will be applied on top of them.
Vector drawables only work for a certain screen density and should not be scaled.
Gửi
Which value of the property scaleType of the ImageView allows us to keep remaining the aspect ratio (the image will not be croped)?
centerInside
fitXY
centerCrop
center
Gửi
1) Webkit
2) OpenGL
3) SQLite
4) Dalvik
5) OpenUI
1,3,4
1,2,3
1,2,5
3,4,5
Gửi
The
createInstance() Answer:
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 5/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
Gửi
Gửi
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?
sample_activity_binding
ActivitySampleBinding
activity_sample_binding
SampleActivityBinding
Gửi
onSupportNavigateUp Answer:
method needs to be overridden in the host activity to ensure your app’s fragment-based navigation responds to the app’s "Up" button?
Gửi
It provides widgets that follow the Material Design guidelines such as text fields and switches.
It provides default Material themes that you can use directly or extend and then customize.
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 6/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
Gửi
Which activity lifecycle method would be called if a dialog appears onscreen, partially obscuring an activity?
onDestroy() because the activity does not need to exist so long as it doesn’t have focus.
onStop() because the activity does not need to respond to user input while the dialog is onscreen.
onResume() because the activity needed to respond to user input to display the dialog.
onPause() because the activity is still displayed, but no longer has focus.
Gửi
In the fragment lifecycle, which of the following tasks should be performed in onViewCreated() ?
Gửi
android.widget.View
android.view.TextView
android.view.View
android.widget.TextView
Gửi
Gradle is an automated build system used by Android Studio to build your apps.
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 7/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
You can configure Android-specific options for your project in your app’s build.gradle file.
The gradle configuration for your project cannot change after you initially create the project.
Gửi
save some states of Activity and restore latter when there is a device configuration changed
save some states of Activity and restore latter when user rotates the device screen
save some states of Activity and restore latter when user changes the language of the device
Gửi
allow to install apps from third party sources (not from Google play store)
Gửi
Gửi
How to handle the event that user press the button and hold for a while?
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 8/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
setLongClickListener
setOnLongClickListener
setOnClickListener
setOnLongTouchListener
Gửi
What is the advantage of Android development environment compare to iOS development environment?
Gửi
The 'when' statement in Kotlin is similar to which statement in other programming languages?
continue
break
switch
if
Gửi
Suppose we have an image named "mobile.png" in the res/drawable folder, and we have an ImageView in the activity layout, which method could
be used to set the image source for the ImageView as the image mobile.png
setImageResource(R.id.mobile)
setImageResource(R.drawable.mobile)
setImageDrawable(R.drawable.mobile)
setImageResource(R.drawable.mobile.png)
Gửi
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-14… 9/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
What is the function to open new activity from the current activity?
newActivity
beginActivity
startActivity
openActivity
Gửi
Câu hỏi #e
1 điểm (không tích lũy, không hiển thị kết quả
intent.putExtra("sms_body", "hello")
startActivity(intent)
Intent.ACTION_SEND_SMS
Intent.ACTION_SEND
Intent.ACTION_SEND_MULTIPLE
Intent.ACTION_SENDTO
Gửi
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?
RadioButton
Recycler View
DropDownList
ListView
Checkbox
Gửi
destroy()
finish()
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-1… 10/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
dispose()
finishActivity()
Gửi
Gửi
If you override onCreateOptionMenu callback in your activity, which menu are you going to create?
Popup Menu
ActionBar Menu
Context Menu
Gửi
Gửi
Intent.ACTION_ACCESS_INTERNET
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-1… 11/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
Intent.ACTION_WEB_VIEW
Intent.ACTION_MAIN
Intent.ACTION_GET_CONTENT
Intent.ACTION_VIEW
Gửi
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?
Gửi
Both Toast and Logcat can be used to debug the program, which expression bellow is wrong?
Toast displays information at device while Logcat displays information at the host
Logcat can not be shown on computer without connection between the computer and the Android device
Gửi
A lambda is an expression that describes a function. But instead of declaring a named function, you declare a function that has no name
Gửi
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-1… 12/13
12/9/23, 2:03 PM Unit | Midterm_Exams | Chương trình học của IT4785E | MOOC daotao.ai
Select all answers that are true for this XML layout when displayed on the screen.
The starting edge of TextView A is aligned to the starting edge of the parent view.
The starting edge of TextView B is aligned to the starting edge of the parent view.
The tops of TextView A and TextView B are aligned to top of the parent view.
Gửi
Which kind of menu will be opened if user presses and hold for a while?
Instant Menu
Context Menu
Drawer Menu
https://soict.daotao.ai/courses/course-v1:SoICT+IT4785E+2023-1-143671/courseware/1cdb04ee0b3149348a3b5357f93c8660/aa62cd3c2880414c96acf9da604a8d48/?activate_block_id=block-v1%3ASoICT%2BIT4785E%2B2023-1-1… 13/13