Coursera Answers

Programming Mobile Applications for Android Handheld Systems: Part 1 | Week 4 Quiz Answer

Programming Mobile Applications for Android Handheld Systems Part 1  Week 4 Quiz Answer


Programming Mobile Applications for Android Handheld Systems: Part 1 | Week 4 Quiz Answer

In This Article i am gone to Share Programming Mobile Applications for Android Handheld Systems: Part 1 | Week 4 | Practice Exercise: User Interface Classes Quiz Answer with you..


Week -4 Practice Exercise Quiz Answer

User Interface Classes


Question 1)

Which of the following statements describe key responsibilities of a View?

  • To draw themselves
  • To contain other Views
  • To handle device reconfiguration
  • To respond to events directed to them


Question 2)

Which of the following are properties that can be set on a View?

  • Position
  • Screen orientation
  • Opacity (transparency)
  • Visibility


Question 3)

(True or False) – An AutoCompleteTextView is a subclass of ViewGroup. Hint: Consult the Android documentation at http://developer.android.com/reference/classes.html

  • True.
  • False.


Question 4)

Which of the following statements describe the relationship between and AdapterView and its Adapter?

  • The Adapter manages a data set for the AdapterView
  • The AdapterView creates the Views for the data in the Adapter.
  • The Adapter asks for Views from the AdapterView.
  • Adapters can notify the AdapterView when the Adapter data changes.


Question 5)

Suppose a layout file declares a LinearLayout called LL that contains two child Views, View1 and View2. In the layout file View1 is given an android:layout_weight of 2 and a layout_width of 0dp. View 2 is given an android:layout_weight of 3 and a layout_width of 0dp. In this example, which of the following statements must be true?


  • View 2 takes up 3/5 of LL’s width.
  • View 1 takes up 2/5 of the display’s width.
  • View 2 takes up 2/3 of the display’s width.
  • View 1 takes up 2/3 of LL’s width.


Question 6)

When a user clicks on a View that has registered to show a Context Menu, which one of the following methods will be called?

  • onContextItemSelected().
  • OnCreateOptionsMenu().
  • registerForContextMenu().
  • setHasOptionsMenu().
  • onCreateContectMenu()


Question 7)

Suppose that an application wants to create and display a Dialog. If the application embodies the Dialog in a DialogFragment, which DialogFragment method will it call to make the Dialog visible to the user?

  • show()
  • dismiss()
  • showFragment().
  • onCreateView()


Question 8)

The ActionBar has four functional areas: The App icon, a View control area, an Action Buttons area and an Action Overflow area. What is the purpose of the Action Overflow area? See; http://developer.android.com/design/patterns/actionbar.html for more information.

  • It is the default location for Action buttons.
  • When Action Buttons cannot fit in or should not be placed on the Action Bar, they are displayed in a separate View that is accessible by touching the Action Overflow area.
  • The Action Overflow area lets the user navigate back to previous points in the Task Back Stack.
  • The Action Overflow area displays a drop down list for accessing commonly-used functions.

Question 9 )
When a user long clicks on a View that has registered to show a Context Menu, which one of the following methods will be called? 


  • onContextItemSelected().
  • OnCreateOptionsMenu().
  • onCreateContextMenu().
  • setHasOptionsMenu().