Android Framework and Development

Test your knowledge of Android framework concepts including UI components (layouts, widgets, ViewGroups), lifecycle management (activities, services), development tools (adb, emulator), logging, graphics (Canvas), and app structure (assets folder, AsyncTask).

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following is an invalid text color of android?

  1. Color.DKGRAY
  2. #FF000000
  3. Color.GREEN
  4. @drawable/red
  5. #765500
Question 2 Multiple Choice (Single Answer)

_______ is not a type of layout in android.

  1. Linear layout
  2. Relative layout
  3. Absolute layout
  4. Border layout
  5. Table layout
Question 3 Multiple Choice (Single Answer)

Which of the following is not used in Log?

  1. V (Verbose)
  2. D (Debug)
  3. T (Toast)
  4. I (Information)
  5. W (Warning)
Question 4 Multiple Choice (Single Answer)

Which class/widget is used to insert radio button in android?

  1. <input type="radio">
  2. RadioGroup, RadioButton
  3. RadioView
  4. All of the above
  5. None of these
Question 5 Multiple Choice (Single Answer)

For displaying text, we have TextView in android. For displaying labels, we

  1. don’t have package LabelView
  2. have LabelView in android
  3. have LabelsView
  4. have Label
  5. None of these
Question 6 Multiple Choice (Single Answer)

Spinner is used for inserting _______ in an android application.

  1. ComboBox
  2. CheckBoxes
  3. TextArea
  4. RadioButton
  5. None of these
Question 7 Multiple Choice (Single Answer)

When we are using command-line programming, ______ tool is very useful to us.

  1. Android Debug Bridge or adb
  2. AVD or Android Virtual Device
  3. Emulator.exe
  4. DX.exe
  5. None of these
Question 8 Multiple Choice (Single Answer)

Which of the following is not a difference between Android activity lifecycle and Android service lifecycle?

  1. Android starts service and calls its onCreate method followed by the onStart method.
  2. onResume, onPause and onStop are not needed.
  3. As with an activity, the onDestroy method is called when the service is about to be terminated.
  4. onResume of activity life cycle is equivalent to onBind method of service.
  5. None of these
Question 9 Multiple Choice (Single Answer)

AutoCompleteTextView is used to

  1. refer a possible value for the completion of a word or phrase typed into it
  2. check the spelling and grammar of the text
  3. auto correct the spelling text typed in TextView
  4. All of the above
  5. None of these
Question 10 Multiple Choice (Single Answer)

Which of the following is not among ViewGroups in android?

  1. Gallery and GridView
  2. ListView
  3. TabHost
  4. BorderLayout
  5. ScrollView
Question 11 Multiple Choice (Single Answer)

What is the syntax of drawLine() method of Canvas?

  1. g.drawLine(0, 4, 5, 16);
  2. canvas.drawLine(56, 0, 56, 100, paint);
  3. drawLine(4, 5, 6, 7);
  4. drawLines(x[], y[], count);
  5. None of these
Question 12 Multiple Choice (Single Answer)

Which of the following android applications cannot be tested on emulator?

  1. Application which just displays text on button click
  2. Application which does basic mathematical operations
  3. Application which shows date & time
  4. Application which uses sensors like camera, GPS, etc
  5. None of these
Question 13 Multiple Choice (Single Answer)

The components that are leaves or nearly leaves do most of the actual drawing. In the context of an application UI, they are commonly called

  1. interfaces
  2. packages
  3. widgets
  4. classes
  5. sub classes
Question 14 Multiple Choice (Single Answer)

The assets folder is used for

  1. storing application resources
  2. storing raw asset files
  3. all Java files
  4. Java files generated by ADT
  5. android manifest for your project
Question 15 Multiple Choice (Single Answer)

AsyncTask is a/an ______ provided by android that helps us to use the UI thread properly

  1. abstract class
  2. package
  3. widget
  4. class
  5. None of these