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).
Questions
Which of the following is an invalid text color of android?
- Color.DKGRAY
- #FF000000
- Color.GREEN
- @drawable/red
- #765500
_______ is not a type of layout in android.
- Linear layout
- Relative layout
- Absolute layout
- Border layout
- Table layout
Which of the following is not used in Log?
- V (Verbose)
- D (Debug)
- T (Toast)
- I (Information)
- W (Warning)
Which class/widget is used to insert radio button in android?
- <input type="radio">
- RadioGroup, RadioButton
- RadioView
- All of the above
- None of these
For displaying text, we have TextView in android. For displaying labels, we
- don’t have package LabelView
- have LabelView in android
- have LabelsView
- have Label
- None of these
Spinner is used for inserting _______ in an android application.
- ComboBox
- CheckBoxes
- TextArea
- RadioButton
- None of these
When we are using command-line programming, ______ tool is very useful to us.
- Android Debug Bridge or adb
- AVD or Android Virtual Device
- Emulator.exe
- DX.exe
- None of these
Which of the following is not a difference between Android activity lifecycle and Android service lifecycle?
- Android starts service and calls its onCreate method followed by the onStart method.
- onResume, onPause and onStop are not needed.
- As with an activity, the onDestroy method is called when the service is about to be terminated.
- onResume of activity life cycle is equivalent to onBind method of service.
- None of these
AutoCompleteTextView is used to
- refer a possible value for the completion of a word or phrase typed into it
- check the spelling and grammar of the text
- auto correct the spelling text typed in TextView
- All of the above
- None of these
Which of the following is not among ViewGroups in android?
- Gallery and GridView
- ListView
- TabHost
- BorderLayout
- ScrollView
What is the syntax of drawLine() method of Canvas?
- g.drawLine(0, 4, 5, 16);
- canvas.drawLine(56, 0, 56, 100, paint);
- drawLine(4, 5, 6, 7);
- drawLines(x[], y[], count);
- None of these
Which of the following android applications cannot be tested on emulator?
- Application which just displays text on button click
- Application which does basic mathematical operations
- Application which shows date & time
- Application which uses sensors like camera, GPS, etc
- None of these
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
- interfaces
- packages
- widgets
- classes
- sub classes
The assets folder is used for
- storing application resources
- storing raw asset files
- all Java files
- Java files generated by ADT
- android manifest for your project
AsyncTask is a/an ______ provided by android that helps us to use the UI thread properly
- abstract class
- package
- widget
- class
- None of these