[Dec 06, 2021] Dumps Collection Associate-Android-Developer Test Engine Dumps Training With 125 Questions [Q42-Q61]

Share

[Dec 06, 2021] Dumps Collection Associate-Android-Developer Test Engine Dumps Training With 125 Questions

Google Associate-Android-Developer Dumps - 100% Cover Real Exam Questions


In addition, the students should also develop competence in the content of the study guide. Below are the highlights of its topics:

Android Core: This section requires that the individuals have an understanding of Android system’s architecture and be able to explain the fundamental building blocks of the Android app. They also need to possess a good comprehension of the process required to develop, build, and run an Android application as well as be capable of displaying basic messages in a pop-up with the use of a ‘Toast’ or a ‘Snackbar’. The test takers should possess the skills in displaying messages outside the UI of an app with the use of ‘Notification’ and schedule background tasks with the use of ‘WorkManager’. Additionally, they should understand the process of localizing an app.

User Interface: This part requires that the applicants have an understanding of the activity lifecycle of Android. They should also be capable of creating an ‘Activity’ that shows a ‘Layout’ as well as constructing a UI using ‘ConstraintLayout’. The section also requires an understanding of how to build a custom ‘View’ class and include it to a ‘Layout’; familiarity with the process of implementing custom app themes and including accessibility hooks to the custom ‘View’. Additionally, the students should also understand how to apply the content descriptions to a view for accessibility. It is also important to understand the process of displaying items in a ‘RecyclerView’ and have the capacity to bind local data to the ‘RecyclerView’ list with the use of the Paging library. They should be able to implement both menu-based and drawer navigation.

Data Management: This topic measures the learners’ skills in defining data with the use of Room entities; accessing ‘Room’ database using a data access object; observing and responding to changing data with the use of ‘LiveData’. The applicants should also have competence in reading and parsing asset files or raw resources; using a Repository for mediating data operations; creating persistent Preference data from the user input; changing behaviors of an app based on the user preferences.

Debugging: This domain will evaluate your understanding of the fundamental debugging methods that are available within Android Studio. It will also measure the skills required for debugging and fixing issues associated with the usability and functional behavior of an app as well as the skills in using System Log to output the debug information. This section of the exam also requires an understanding of the process involved in using breakpoints in Android Studio and inspecting variables with the use of Android Studio.

Testing: This area requires a thorough understanding of the fundamentals of testing and the ability to write the functional local JUnit tests. It will also measure the understanding of the Espresso UI test framework as well as the skills in writing the functional automated Android tests.

 

NEW QUESTION 42
In our TeaViewModel class, that extends ViewModel, we have such method:
public LiveData<Tea> getTea() { return mTea;
}
An observer in our Activity (type of mViewModel variable in example is TeaViewModel) is set in this way:
mViewModel.getTea().observe(this, this::displayTea);
What will be a correct displayTea method definition?

  • A. private void displayTea()
  • B. private void displayTea(LiveData<Tea>)
  • C. private void displayTea(LiveData<T>)
  • D. private void displayTea(Tea tea)

Answer: D

 

NEW QUESTION 43
Which statement is most true about layout_constraintLeft_toRightOf and layout_constraintStart_toEndOf constraints ?

  • A. layout_constraintLeft_toRightOf is equal to layout_constraintStart_toEndOf in case if user choose a language that uses right-to-left (RTL) scripts, such as Arabic or Hebrew, for their UI locale
  • B. layout_constraintLeft_toRightOf is equal to layout_constraintStart_toEndOf in any case
  • C. layout_constraintLeft_toRightOf is equal to layout_constraintStart_toEndOf in case if user choose a language that uses left-to-right (LTR) scripts, such as English or French, for their UI locale
  • D. layout_constraintLeft_toRightOf works with horizontal axes and layout_constraintStart_toEndOf works with vertical axes

Answer: C

Explanation:
Reference:
https://developer.android.com/training/basics/supporting-devices/languages

 

NEW QUESTION 44
Move the major components of the Android platform to correct places in diagram.

Answer:

Explanation:

Reference:
https://developer.android.com/guide/platform

 

NEW QUESTION 45
An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:
public MyViewModel(MyRepository myRepository)...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) { try {
//MISSED RETURN VALUE HERE
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new RuntimeException("Cannot create an instance of " + modelClass, e);
}
}
What should we write instead of "//MISSED RETURN VALUE HERE"?

  • A. return modelClass.getConstructor()
    .newInstance(mRepository);
  • B. return modelClass.getConstructor(MyRepository.class)
    .newInstance(mRepository);
  • C. return modelClass.getConstructor(MyRepository.class)
    .newInstance();

Answer: B

 

NEW QUESTION 46
The easiest way of adding menu items (to specify the options menu for an activity) is inflating an XML file into the Menu via MenuInflater. With menu_main.xml we can do it in this way:

  • A. @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.menu.menu_main);
    }
  • B. @Override
    public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true;
    }
  • C. @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return super.onOptionsItemSelected(item);
    }

Answer: B

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/menus

 

NEW QUESTION 47
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-ja/
  • B. Android loads graphics from res/drawable-small-land-stylus/
  • C. Android loads graphics from res/drawable/

Answer: A

Explanation:
Reference:
https://developer.android.com/guide/topics/resources/localization

 

NEW QUESTION 48
If constant LENGTH_INDEFINITE is used as a parameter for the setDuration method in Snackbar, what will happen?

  • A. The Snackbar will be displayed for a long period of time.
  • B. The constant LENGTH_INDEFINITE is impossible parameter for the setDuration method in Snackbar
  • C. The Snackbar will be displayed for a very long period of time.
  • D. The Snackbar will be displayed for a short period of time.
  • E. The Snackbar will be displayed from the time that is shown until either it is dismissed, or another Snackbar is shown.

Answer: E

 

NEW QUESTION 49
Select 3 major components of the Room. (Choose three.)

  • A. @Query
  • B. @DAO
  • C. @Entity
  • D. @WorkerThread
  • E. @Database
  • F. @RawQuery

Answer: B,C,E

 

NEW QUESTION 50
To run a debuggable build variant you must use a build variant that includes

  • A. minifyEnabled false in the build configuration
  • B. debuggable true in the build configuration
  • C. debuggable true or debuggable false in the build configuration

Answer: B

 

NEW QUESTION 51
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...")
    .setLongText("Much longer text that cannot fit one line..."))
    ...
  • C. var builder = NotificationCompat.Builder(this, CHANNEL_ID)
    .setContentText("Much longer text that cannot fit one line...")
    .setTheme(android.R.style.Theme_LongText);
    ...

Answer: A

Explanation:
Reference:
https://developer.android.com/training/notify-user/build-notification

 

NEW QUESTION 52
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, but you cannot see its updated values before updating the data by clicking the Refresh table button at the top of the inspector window.
  • B. It is still editable. You can modify data in a table by double-clicking a cell, typing a new value, and pressing Enter.
  • C. It becomes read-only and you cannot modify its values.

Answer: C

 

NEW QUESTION 53
In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?

  • A. findPreference
  • B. setPreferenceScreen
  • C. addPreferencesFromResource
  • D. getPreferenceManager

Answer: C

 

NEW QUESTION 54
Custom views and directional controller clicks. On most devices, clicking a view using a directional controller sends (to the view currently in focus) a KeyEvent with:

  • A. KEYCODE_BUTTON_START
  • B. KEYCODE_DPAD_CENTER
  • C. KEYCODE_CALL
  • D. KEYCODE_BUTTON_SELECT

Answer: B

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/accessibility/custom-views

 

NEW QUESTION 55
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 Analyze APK.
  • B. Click the Run button from toolbar
  • C. Select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).

Answer: C

Explanation:
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

 

NEW QUESTION 56
LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread:
liveData.postValue("a"); liveData.setValue("b");
What will be the correct statement?

  • A. The value "b" would be set at first and would not be overridden with the value "a".
  • B. The value "a" would be set at first and would not be overridden with the value "b".
  • C. The value "a" would be set at first and later the main thread would override it with the value "b".
  • D. The value "b" would be set at first and later the main thread would override it with the value "a".

Answer: C

 

NEW QUESTION 57
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<ListPreference android:id="@+id/order_by" android:key="@string/pref_sort_key" android:title="@string/pref_sort_title" android:summary="@string/pref_sort_summary" android:dialogTitle="@string/pref_sort_dialog_title" android:entries="@array/sort_oder" android:entryValues="@array/sort_oder_value" android:defaultValue="@string/pref_default_sort_value" app:iconSpaceReserved="false" /> In our Fragment, we can dynamically get current notification preference value in this way:

  • A. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString( context!!.getString(R.string.pref_sort_key), context!!.getString(R.string.pref_default_sort_value) )
  • B. val sortBy = PreferenceManager.getSharedPreferences(context).getBoolean( context!!.resources.getBoolean(R.bool.pref_default_sort_value), context!!.getString(R.string.pref_sort_key) )
  • C. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString( context!!.getString(R.string.pref_sort_key), context!!.resources.getBoolean(R.bool.pref_default_sort_value) )
  • D. val sortBy = PreferenceManager.getSharedPreferences(context).getString( context!!.getString(R.string.pref_default_sort_value), context!!.getString(R.string.pref_sort_key), )

Answer: A

 

NEW QUESTION 58
What public methods are there in android.widget.Toast.Callback? (Choose two.)

  • A. onDismissed()
  • B. onToastShown()
  • C. onToastHidden()
  • D. onShown()
  • E. onToastCancelled()

Answer: B,C

 

NEW QUESTION 59
Under the hood WorkManager uses an underlying job dispatching service based on the following criteri a. You need to move services to the correct places.

Answer:

Explanation:

Explanation:
Videos:
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

 

NEW QUESTION 60
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<ListPreference android:id="@+id/order_by" android:key="@string/pref_sort_key" android:title="@string/pref_sort_title" android:summary="@string/pref_sort_summary" android:dialogTitle="@string/pref_sort_dialog_title" android:entries="@array/sort_oder" android:entryValues="@array/sort_oder_value" android:defaultValue="@string/pref_default_sort_value" app:iconSpaceReserved="false" /> In our Fragment, we can dynamically get current notification preference value in this way:

  • A. boolean sortBy = PreferenceManager.getSharedPreferences(getContext()).getBoolean ( getContext().getResources().getBoolean(R.bool.pref_default_sort_value), getContext().getString(R.string.pref_sort_key) );
  • B. String sortBy = PreferenceManager.getDefaultSharedPreferences(getContext ()).getString( getContext().getString(R.string.pref_sort_key), getContext().getResources().getBoolean(R.bool.pref_default_sort_value) );
  • C. String sortBy = PreferenceManager.getDefaultSharedPreferences(getContext ()).getString( getContext().getString(R.string.pref_sort_key), getContext().getString(R.string.pref_default_sort_value) )
  • D. String sortBy = PreferenceManager.getSharedPreferences(getContext()).getString( getContext().getString(R.string.pref_default_sort_value), getContext().getString(R.string.pref_sort_key) );

Answer: C

 

NEW QUESTION 61
......

Realistic PrepAwayTest Associate-Android-Developer Dumps PDF - 100% Passing Guarantee: https://www.prepawaytest.com/Google/Associate-Android-Developer-practice-exam-dumps.html

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 )
From Monday to Saturday

Support: Contact now