Associate-Android-Developer事前に試験練習テストで使おう(最新125問題)
有効なAssociate-Android-Developer試験解答PDF一年無料更新
Google Associate-Android-Developer 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
| トピック 4 |
|
| トピック 5 |
|
質問 37
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can
- A. advance to the next line in the code (without entering a method)
- B. examine the object tree for a variable; expand it in the Variables view.
- C. continue running the app normally
- D. advance to the first line inside a method call
- E. evaluate an expression at the current execution point
- F. advance to the next line outside the current method
正解: A
質問 38
What do you want from Room when you create a DAO method and annotate it with @Delete?
Example:
@Dao
public interface MyDao {
@Delete
public void deleteUsers(User... users);
}
- A. Room generates an implementation that inserts all parameters into the database in a single transaction.
- B. Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
- C. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
正解: C
質問 39
The Layout Inspector in Android Studio allows you to compare your app layout with design mockups, display a magnified or 3D view of your app, and examine details of its layout at runtime. When this is especially useful?
- A. when your layout is built at runtime rather than entirely in XML and the layout is behaving unexpectedly.
- B. when your layout is built entirely in XML rather than runtime and the layout is behaving expectedly.
正解: A
質問 40
The diagram below shows a basic form of the recommended architecture for apps that use Architecture Components. The architecture consists of a UI controller, a ViewModel that serves LiveData, a Repository, and a Room database. Drag modules to correct places.
正解:
解説:
質問 41
Android Tests. You can use the childSelector() method to nest multiple UiSelector instances. For example, the following code example shows how your test might specify a search to find the first ListView in the currently displayed UI, then search within that ListView to find a UI element with the text property Apps.
What is the correct sample?
- A. val appItem: UiObject = device.findObject( UiSelector().className("android.widget.ListView")
.instance(0)
.childSelector(
UiSelector().text("Apps")
)
) - B. val appItem: UiObject = device.findObject( UiSelector().className(ListView.class)
.instance(1)
.childSelector(
UiSelector().text("Apps")
)
) - C. val appItem: UiObject = device.findObject( UiSelector().className("android.widget.ListView")
.instance(
UiSelector().text("Apps")
)
)
正解: A
質問 42
Assume that an app includes a default set of graphics and two other sets of graphics, each optimized for a different device setup:
res/drawable/
Contains default graphics. res/drawable-small-land-stylus/
Contains graphics optimized for use with a device that expects input from a stylus and has a QVGA low- density screen in landscape orientation. res/drawable-ja/ Contains graphics optimized for use with Japanese.
What happens if the app runs on a device that is configured to use Japanese and, at the same time, the device happens to be one that expects input from a stylus and has a QVGA low-density screen in landscape orientation?
- A. Android loads graphics from res/drawable/
- B. Android loads graphics from res/drawable-ja/
- C. Android loads graphics from res/drawable-small-land-stylus/
正解: B
解説:
Reference:
https://developer.android.com/guide/topics/resources/localization
質問 43
Move the major components of the Android platform to correct places in diagram.
正解:
解説:
Reference:
https://developer.android.com/guide/platform
質問 44
Select correct demonstration of WorkRequest cancellation.
- A. val request: WorkRequest = OneTimeWorkRequest.Builder (FooWorker::class.java).build() workManager.enqueue(request) workManager.cancelWork(request)
- B. val request: WorkRequest = OneTimeWorkRequest.Builder (FooWorker::class.java).build() workManager.enqueue(request) val status = workManager.getWorkInfoByIdLiveData(request.id) status.observe(...)
- C. workManager.enqueue(OneTimeWorkRequest.Builder(FooWorker::class.java).build())
- D. val request: WorkRequest = OneTimeWorkRequest.Builder (FooWorker::class.java).build() workManager.enqueue(request) workManager.cancelWorkById(request.id)
- E. val request1: WorkRequest = OneTimeWorkRequest.Builder (FooWorker::class.java).build() val request2: WorkRequest = OneTimeWorkRequest.Builder (BarWorker::class.java).build() val request3: WorkRequest = OneTimeWorkRequest.Builder (BazWorker::class.java).build() workManager.beginWith(request1, request2).then(request3).enqueue()
正解: D
解説:
Working with WorkManager, from the 2018 Android Dev Summit WorkManager: Beyond the basics, from the 2019 Android Dev Summit Reference:
https://developer.android.com/reference/androidx/work/WorkManager?hl=en
質問 45
When using an ImageView, ImageButton, CheckBox, or other View that conveys information graphically. What attribute to use to provide a content label for that View?
- A. android:contentDescription
- B. android:hint
- C. android:labelFor
正解: A
解説:
Reference:
https://support.google.com/accessibility/android/answer/7158690?hl=en
質問 46
When using an EditTexts or editable TextViews, or other editable View. What attribute to use to provide a content label for that View?
- A. android:hint
- B. android:contentDescription
- C. android:labelFor
正解: A
解説:
Reference:
https://support.google.com/accessibility/android/answer/7158690?hl=en
質問 47
For example, we have a file in our assets folder app/src/main/assets/sample_teas.json. To get an InputStream for reading it, from out Context context, we can try doing this:
- A. InputStream input = context.getAssets().open("sample_teas.json");
- B. InputStream input = context.getResources().openRawResource(R.raw.sample_teas);
- C. InputStream input = context.getResources().getAssets().open ("sample_teas.json");
正解: A
質問 48
If you want get a debuggable APK that people can install without adb, in Android Studio you can:
- A. Select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).
- B. Click the Run button from toolbar
- C. Select your debug variant and click Analyze APK.
正解: A
解説:
The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).
Reference:
https://developer.android.com/studio/run
質問 49
Select correct statements about Hardware Abstraction Layer (HAL). (Choose two.)
- A. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.
- B. Using a HAL, not using a Linux kernel, allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
- C. The HAL function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself - you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify
- D. The HAL provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework.
正解: A,D
解説:
The system apps function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself - you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify Using a Linux kernel allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
Reference:
https://developer.android.com/guide/platform
質問 50
For example, we have a file in our raw folder app/src/main/res/raw/sample_teas.json. To get an InputStream for reading it, from out Context context, we can do this:
- A. InputStream input = context.openRawResource(R.raw.sample_teas);
- B. InputStream input = context.getRawResource(R.raw.sample_teas);
- C. InputStream input = context.getResources().openRawResource(R.raw.sample_teas);
正解: C
質問 51
Room can export your database's schema information into a JSON file at compile time. What annotation processor property you should set in your app/build.gradle file to export the schema?
- A. room.incremental
- B. room.expandProjection
- C. room.schemaLocation
正解: C
解説:
android {
...
defaultConfig {
...
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation":
"$projectDir/schemas".toString()]
}
}
}
}
質問 52
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can
- A. continue running the app normally
- B. evaluate an expression at the current execution point
- C. advance to the first line inside a method call
- D. advance to the next line in the code (without entering a method)
- E. advance to the next line outside the current method
- F. examine the object tree for a variable; expand it in the Variables view
正解: B
質問 53
If you are working with a Builder that creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period. What statement is correct?
- A. The repeat interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
- B. The repeat interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
- C. The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval can be anything in relation to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
- D. The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
正解: D
解説:
Working with WorkManager, from the 2018 Android Dev Summit WorkManager: Beyond the basics, from the 2019 Android Dev Summit Reference:
https://developer.android.com/reference/androidx/work/WorkManager?hl=en
質問 54
By default, the notification's text content is truncated to fit one line. If you want your notification to be longer, for example, to create a larger text area, you can do it in this way:
- A. var builder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Much longer text that cannot fit one line...")
.setStyle(NotificationCompat.BigTextStyle()
.bigText("Much longer text that cannot fit one line..."))
... - B. var builder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Much longer text that cannot fit one line...")
.setTheme(android.R.style.Theme_LongText);
... - C. var builder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Much longer text that cannot fit one line...")
.setLongText("Much longer text that cannot fit one line..."))
...
正解: A
解説:
Reference:
https://developer.android.com/training/notify-user/build-notification
質問 55
If you want the Database Inspector to automatically update the data it presents as you interact with your running app, check the Live updates checkbox at the top of the inspector window. While live updates are enabled, what happens with the table in the inspector window?
- A. It becomes read-only and you cannot modify its values.
- B. It becomes read-only, but you cannot see its updated values before updating the data by clicking the Refresh table button at the top of the inspector window.
- C. It is still editable. You can modify data in a table by double-clicking a cell, typing a new value, and pressing Enter.
正解: A
質問 56
With our Context we can get SharedPreferences with a method, named: getSharedPreferences (String name, int mode). What value can we transfer in a "mode"parameter?
- A. Value is either 0 or a combination of MODE_PRIVATE, MODE_WORLD_READABLE, D.
MODE_WORLD_WRITEABLE, and MODE_MULTI_PROCESS - B. combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
- C. MODE_PRIVATE or MODE_PUBLIC
正解: A
質問 57
What do you want from Room when you create a DAO method and annotate it with @Update?
Example:
@Dao
interface MyDao {
@Update
fun updateUsers(vararg users: User)
}
- A. Room generates an implementation that inserts all parameters into the database in a single transaction.
- B. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
- C. Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
正解: C
質問 58
......
Google Developers Certification - Associate Android Developer (Kotlin and Java Exam)無料更新認定サンプル問題:https://jp.fast2test.com/Associate-Android-Developer-premium-file.html