Android

Description: A Quiz on Android Framework Overview
Number of Questions: 15
Created by:
Tags: TextView Screen Layout Design: Views and Layouts Graphics Resources in Android Android Software Development Platform Android Framework Overview
Attempted 0/15 Correct 0 Score 0

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

  1. Color.DKGRAY

  2. #FF000000

  3. Color.GREEN

  4. @drawable/red

  5. #765500


Correct Option: E
Explanation:

 #765500 is valid in HTML, but not in Android.

_______ is not a type of layout in android.

  1. Linear layout

  2. Relative layout

  3. Absolute layout

  4. Border layout

  5. Table layout


Correct Option: D
Explanation:

This layout is not in android.

Which of the following is not used in Log?

  1. V (Verbose)

  2. D (Debug)

  3. T (Toast)

  4. I (Information)

  5. W (Warning)


Correct Option: C
Explanation:

Provides a simple pop up and it is not log

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

  1. RadioGroup, RadioButton

  2. RadioView

  3. All of the above

  4. None of these


Correct Option: B
Explanation:

RadioGroup and RadioButton are used for inserting radio buttons in android.

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


Correct Option: A
Explanation:

 All text displays are facilitated through the TextView. There is no packaged android LabelView.

Spinner is used for inserting _______ in an android application.

  1. ComboBox

  2. CheckBoxes

  3. TextArea

  4. RadioButton

  5. None of these


Correct Option: A
Explanation:

A spinner view is similar to a ComboBox in other programming languages.

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


Correct Option: A
Explanation:

The tool that will become very useful to us when we are using command-line programming is Android Debug Bridge or adb (adb.exe).

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


Correct Option: D
Explanation:

If a client needs a persistent connection to a service, it can call the Context.bind Service method, while onResume is called right after onStart if your activity is the foreground activity on the screen.

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


Correct Option: A
Explanation:

AutoCompleteTextView, as the name implies, is a modified TextView that will refer a possible value for the completion of a word or phrase typed into it.

Which of the following is not among ViewGroups in android?

  1. Gallery and GridView

  2. ListView

  3. TabHost

  4. BorderLayout

  5. ScrollView


Correct Option: D
Explanation:

 BorderLayout is present in AWT of Java.

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


Correct Option: B
Explanation:

canvas.drawLine(56, 0, 56, 100, paint); is valid in android.

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


Correct Option: D
Explanation:

There are various sensors on  android phones, e.g. GPS, camera, accelerometer that cannot be tested on emulator.

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


Correct Option: C
Explanation:

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

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


Correct Option: B
Explanation:

You can use it to store raw asset files.

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


Correct Option: A
Explanation:

AsyncTask is an abstract class.

- Hide questions