Android App Development Test - 1

Android App Development Test-1

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Suppose if we want to create an application of calculator, what type of layout is suitable?

  1. Framelayout
  2. Gridlayout
  3. Tablelayout
  4. Relativelayout
Question 2 Multiple Choice (Single Answer)

Android will place views on the left side of the screen. To change this, we use the _____________ attribute.

  1. Layout_gravity
  2. Gravity
  3. Alignment
  4. Gravity_layout
Question 3 Multiple Choice (Single Answer)

Which of the following is correct for relativelayout?

  1. The child views of a relative layout are arranged in the order they are declared.
  2. There is a circular dependency in a relative layout.
  3. We can set the width of the Relativelayout to wrap_content.
  4. We can set the height of the Relativelayout to wrap_content.
Question 4 Multiple Choice (Single Answer)

Which one of the following is not a layout container of Android?

  1. FrameLayout
  2. TableLayout
  3. LinearLayout
  4. CardLayout
Question 5 Multiple Choice (Single Answer)

Which of the following statements is/are true for ListView?
A. android.R.layout.simple_list_item_1 is used to display a single line of text in a row of ListView.
B. Android.R.layout.two_line_list_item displays two lines of text per row of a list.

  1. Only A
  2. Only B
  3. Both A and B
  4. Neither A nor B
Question 6 Multiple Choice (Single Answer)

GridLayout makes it easier to create a common “dashboard”-style UI seen in apps like Google+. We normally create such a UI using a Tablelayout, but GridLayout allows us to create the same layout with a ________________.

  1. same hierarchy
  2. ladder hierarchy
  3. flatter hierarchy
  4. bottom-top hierarchy
Question 7 Multiple Choice (Single Answer)

Which of the following attributes is used when we have a static unchanging list of values to populate the list view?

  1. Static
  2. Constant
  3. Entries
  4. Entry
Question 8 Multiple Choice (Single Answer)

Which of the following classes is used to simplify the process of loading the data and is available to all versions of Android through the compatibility package?

  1. Load
  2. Loader
  3. DataLoader
  4. DataLoad
Question 9 Multiple Choice (Single Answer)

____________ populate the elements of a ________ based on some internal data storage.

  1. ListAdapters and ListView
  2. ListView and ListAdapters
  3. LayoutInflater and ListView
  4. ListView and LayoutInflater
Question 10 Multiple Choice (Single Answer)

If you created an email application, any text entered by the user should be saved to your database during ______ callback.

  1. onCreate
  2. onPause
  3. onStop
  4. onResume
Question 11 Multiple Choice (Single Answer)

Which of the following codes is added to XML file for vertical linear layout?

  1. <Linearlayout android:layout_height=”wrap content” android:layout_width=”match parent”
    android:layout_orientation=”horizontal”>
  2. <Linearlayout android:layout_height=”wrap content” android:layout_width=”match parent”
    android:orientation=”vertical”>
  3. <Linearlayout android:layout_height=”wrap content” android:layout_width=”match parent”
    android:orientation=0>
  4. <Linearlayout android:layout_height=”wrap content” android:layout_width=”match parent”
    android:orientations=”horizontal”>
Question 12 Multiple Choice (Single Answer)

Which of the following things should be remembered about activities?
A. The system will aggressively destroy your activity when it’s not visible to the user.
B. As all the callbacks run on the main thread, so you should not perform any long-running or computationally expensive operations in those callbacks.

  1. Only A
  2. Only B
  3. Both A and B
  4. Neither A nor B
Question 13 Multiple Choice (Single Answer)

Which of the following functions are used in Activity Life Cycle of Android?

  1. onCreate(), onStart(), onResume(), onPause(), onStop().
  2. onCreate(), onStart(), onResume(), onStop(), onDestroy().
  3. onCreate(), onResume(), onPause(), onStop(), nDestroy().
  4. onCreate(), onStart(), onResume(), onPause(), onStop(), onDestroy().
Question 14 Multiple Choice (Single Answer)

Which of the following APIs are not used to handle exception when we try to update the UI from one of our worker threads?

  1. The Activity.runOnUiThread method
  2. The View.post, View.postDelayed and View.postInValidate methods
  3. The AsyncTask class
  4. SyncTask class