Exam2pass
0 items Sign In or Register
  • Home
  • IT Exams
  • Guarantee
  • FAQs
  • Reviews
  • Contact Us
  • Demo
Exam2pass > Google > Google Certifications > ASSOCIATE-ANDROID-DEVELOPER > ASSOCIATE-ANDROID-DEVELOPER Online Practice Questions and Answers

ASSOCIATE-ANDROID-DEVELOPER Online Practice Questions and Answers

Questions 4

The following code snippet shows an example of an Espresso test:

A. @Rule

fun greeterSaysHello() {

onView(withId(R.id.name_field)).do(typeText("Steve"))

onView(withId(R.id.greet_button)).do(click())

onView(withText("Hello Steve!")).check(matches(isDisplayed()))

}

B. @Test

fun greeterSaysHello() {

onView(withId(R.id.name_field)).perform(typeText("Steve"))

onView(withId(R.id.greet_button)).perform(click())

onView(withText("Hello Steve!")).check(matches(isDisplayed()))

}

C. @Test

fun greeterSaysHello() {

onView(withId(R.id.name_field)).do(typeText("Steve"))

onView(withId(R.id.greet_button)).do(click())

onView(withText("Hello Steve!")).compare(matches(isDisplayed()))

}

Buy Now

Correct Answer: B

Questions 5

For example, our preferences.xmlfile was added by addPreferencesFromResource(R.xml.preferences). Our preferences.xmlfile contains such item:

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!!.resources.getBoolean(R.bool.pref_default_sort_value)

)

B. val sortBy = PreferenceManager.getSharedPreferences(context).getString(context!!.getString(R.string.pref_default_sort_value),context!!.getString(R.string.pref_sort_key),

)

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

)

D. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString(context!!.getString(R.string.pref_sort_key),context!!.getString(R.string.pref_default_sort_value)

)

Buy Now

Correct Answer: D

Questions 6

The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :

A. validate your app's behavior one class at a time.

B. validate either interactions between levels of the stack within a module, or interactions between related modules.

C. validate user journeys spanning multiple modules of your app.

Buy Now

Correct Answer: A

Questions 7

Filter logcat messages. If in the filter menu, a filter option "Show only selected application"? means:

A. Display the messages produced by the app code only (the default). Logcat filters the log messages using the PID of the active app.

B. Apply no filters. Logcat displays all log messages from the device, regardless of which process you selected.

C. Create or modify a custom filter. For example, you could create a filter to view log messages from two apps at the same time.

Buy Now

Correct Answer: A

Questions 8

SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. All changes you make in an editor are batched, and not copied back to the original SharedPreferences until you call:

A. commit()

B. apply() C. commit() or apply()

Buy Now

Correct Answer: C

Questions 9

The following code snippet shows an example of an Espresso test:

A. @Rule

public void greeterSaysHello() {

onView(withId(R.id.name_field)).do(typeText("Steve"));

onView(withId(R.id.greet_button)).do(click());

onView(withText("Hello Steve!")).check(matches(isDisplayed()));

}

B. @Test

public void greeterSaysHello() {

onView(withId(R.id.name_field)).perform(typeText("Steve"));

onView(withId(R.id.greet_button)).perform(click());

onView(withText("Hello Steve!")).check(matches(isDisplayed()));

}

C. @Test

public void greeterSaysHello() {

onView(withId(R.id.name_field)).do(typeText("Steve"));

onView(withId(R.id.greet_button)).do(click());

onView(withText("Hello Steve!")).compare(matches(isDisplayed()));

}

Buy Now

Correct Answer: B

Questions 10

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-small-land-stylus/

C. Android loads graphics from res/drawable-ja/

Buy Now

Correct Answer: C

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

Questions 11

Custom views and directional controller clicks. In general, you should send an AccessibilityEvent whenever the content of your custom view changes. For example, if a text value was changed in your custom view, you should emit an event of this type:

A. TYPE_WINDOWS_CHANGED

B. TYPE_VIEW_CONTEXT_CLICKED

C. TYPE_WINDOWS_CHANGED

D. TYPE_VIEW_TEXT_CHANGED

Buy Now

Correct Answer: D

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

Questions 12

Content labels. What attribute to use to indicate that a View should act as a content label for another View?

A. android:contentDescription

B. android:hint

C. android:labelFor

Buy Now

Correct Answer: C

Reference: https://support.google.com/accessibility/android/answer/7158690?hl=en

Questions 13

In application theme style, flag windowDrawsSystemBarBackgrounds () indicates:

A. whether this window should have an Action Bar in place of the usual title bar.

B. whether there should be no title on this window.

C. that this window should not be displayed at all.

D. whether this is a floating window.

E. whether this Window is responsible for drawing the background for the system bars.

Buy Now

Correct Answer: E

Reference:

https://developer.android.com/guide/topics/ui/look-and-feel/themes https://developer.android.com/reference/android/R.styleable.html

Exam Code: ASSOCIATE-ANDROID-DEVELOPER
Exam Name: Associate Android Developer (Kotlin and Java)
Last Update:
Questions: 128

PDF (Q&A)

$45.99
ADD TO CART

VCE

$49.99
ADD TO CART

PDF + VCE

$59.99
ADD TO CART

Exam2Pass----The Most Reliable Exam Preparation Assistance

There are tens of thousands of certification exam dumps provided on the internet. And how to choose the most reliable one among them is the first problem one certification candidate should face. Exam2Pass provide a shot cut to pass the exam and get the certification. If you need help on any questions or any Exam2Pass exam PDF and VCE simulators, customer support team is ready to help at any time when required.

Home | Guarantee & Policy |  Privacy & Policy |  Terms & Conditions |  How to buy |  FAQs |  About Us |  Contact Us |  Demo |  Reviews

2025 Copyright @ exam2pass.com All trademarks are the property of their respective vendors. We are not associated with any of them.