Android and-801 practice test

Android Application Development v8 Exam


Question 1

What does the following code snippet do?

  • A. Creates a FrameView.
  • B. Creates a Cradview.
  • C. Creates a RecyclerView.
  • D. Creates a ListView-
Answer:

C

Discussions
0 / 600

Question 2

Assume you were given the code of an Android app that include a Google Map. When you checked
the apps code, you found the following: var locationMangaer: LocationManager?=null var
locationUstener: LocationListener?=null Which of the following is true about this app?

  • A. This app is just lo show locations on Google map.
  • B. LocationListener is used to give the app user to change the Google map database.
  • C. This app captures a user s location (coordinates) and uses N in its work Row.
  • D. These classes are not related to Google map.
Answer:

A

Discussions
0 / 600

Question 3

The following Android code locates Toronto CN tower on Google map using on the latitude and
longitude coordinates. Which of the following choices is the correct choice to show your Google map
in the zoom-in state?

A.
Replace:
GMap.moveCameralCameraaUpdateFactory.newLatLng(cnToiwf))
with:
GMap.moveCameta{CameraUpdaieFaclory.newtalLnoZoom(cnTowerT16f)0
B. We can only show a position on Google map and we don't have permission to modify the zoom
level
C. Change the coordinates value to get the zoom level what we need
D. Add the following code: GoogleMapZoom(60)%

Answer:

A

Discussions
0 / 600

Question 4

The following image displays an Android notification labeled with the responsible to configure each
part of it. Which of the following choices sets the Android notification title?

  • A. Notification Title( )
  • B. Notification_setTitle ( )
  • C. setTitle ( )
  • D. setcontentTitle
Answer:

D

Discussions
0 / 600

Question 5

The following image includes Android code for a WebView widget (ID: MyWebView) to work as a
web browser for the URL:
http://www.androidatc.com
. When you run this code, the app does not
open the
www.androidatc.com
web site. Which step is still missing to open this web site through this
app?

  • A. Configure me activity main.xml file to enable Ihe WlFi connection or mobile data connection.
  • B. This app will open the web site without the need to add any additional configuration
  • C. Add additional code to configure FireFox web browser as default web browser for this app.
  • D. Configure the app's AndroidManifest file to allow this app to connect to the Internet by adding the <uses-permission android:name="android.permission.INTERNET"/> tag.
Answer:

C

Discussions
0 / 600

Question 6

The code snippet below displays a menu which is illustrated in another image. The emulator image
displays a menu that contains three items, but in the code file none of these menu items are
available. Where do these items come from?

  • A. This file will not show any menu items.
  • B. As illustrated in the code, these items are already added in the resource the called menu.xml and this file exists m a container called menu.
  • C. These menu items are already added to AndroidManitfest,xml file.
  • D. These items are added in activity_main.xml file.
Answer:

B

Discussions
0 / 600

Question 7

The following image includes Android code for creating a Date Picker. The date will appear in
TextView which has id: dateText. Which of the following choices is correct about why you must add T
to the month as illustrated in the code highlighted in brown?

  • A. Because the month starts from 0 until 11; therefore, adding 1 gives the correct montn value.
  • B. No value will be added to the month, it is date style only.
  • C. This a part of me loop.
  • D. To avoid any conflict due to difference in the time zone.
Answer:

A

Discussions
0 / 600

Question 8

The following images include an Android code for SeekBar (id: MyseekBar) and one state of its
operation. What does "Result" represent in this code?

  • A. Result is the seekbar id.
  • B. No any role for Result in this code.
  • C. Result is the id of TextView widget which will show the result messages of SeekBar operation.
  • D. Result is the maximum value of SeekBar steps that can be moved.
Answer:

C

Discussions
0 / 600

Question 9

The following image includes Android code for an app that contains a button with an id :
"Downloadbutton". When the app user clicks this button, a progress bar with id: "progressBar" will
show up. What will happen if you change *'rate+=10" illustrated with green underlined text to
rate+=50"?

  • A. No any change m progress bar work.
  • B. The progress bar will finish within two steps only.
  • C. You will get error and the app will not work.
  • D. The progress bar will work before slowly than before.
Answer:

B

Discussions
0 / 600

Question 10

The first image below includes an Android code to generate AlertDialog which is illustrated in the
second image. The last line of the code includes "xxxxxxx". Which of the following choices is the
correct line of code to replace "xxxxxxx" for the purpose of showing this AlertDialog?

  • B. Save-Activity( )
  • C. Start.activity ( )
  • D. savealert.show( )
Answer:

A

Discussions
0 / 600
To page 2