MCQ Chapter 3
Chapter 3
User Interface Design
1) Space outside
of widget can be customized using
- padding
- height
- weight
- margins
Ans D: margins
2) Tab that shows
hierarchy of project is
- Build variants
- Structure
- Favorites
- Project
Ans: B: Structure
3) If a
button is clicked whose method in Java is not defined then android application
will
- do nothing
- crash
- show black screen
- get hang
Ans:B: crash
4) Android
calculates pixels density of mobile (currently using app) using unit of
measurement
- CP
- SP
- DP
- GP
Ans C:DP
5) In android
studio, each new activity created must be defined in
- res/layout
- res/values
- Build.gradle
- AndroidManifest.xml
Ans:D: AndroidManifest.xml
6) A type of
service provided by android that controls application lifespan and activity
pile is
- Activity Manager
- View System
- Notifications Manager
- Content Providers
Ans:A: Activity Manager
7) Activity is
needed to be stopped by doing any operation until resumed callback is called,
type of callback is
- onPause
- onDestroy
- onResume
- onRestart
Ans:A: onPause
8) Property that
is used for formatting font is
- Color
- typeface
- ImageView
- Mip Map
Ans:B: typeface
9) In android
studio, currently open file location can be shown by
- navigation bar
- tool bar
- menu bar
- editor tab
Ans:A: navigation bar
10)
Considering following statement <br>protected void onCreated(Bund
saveInstncState) {, onCreated is called
- method declaration
- method name
- method signature
- method call
Ans:B: method name
11) In android
studio, callback that is called when activity restarts after being stopped is
- onStop
- onDestroy
- onRestart
- onResume
Ans:C: onRestart
12) Android
library that provides access user interfaces' building blocks is
- android.webkit
- android.view
- android.os
- android.text
Ans:B: android.view
13 In android
studio, callback that is called when activity is first time created is
- onResume
- onDestroy
- onCreate
- onStop
Ans:C: onCreate
14) Element of
palette that holds multiple elements of specific purpose is called
- widgets
- containers
- textfields
- layouts
Ans:B: containers
15) If we want to
refer another class functionality then android can know it only by declaring
its name prior to use with reserve word
- package
- extend
- import
- protected
Ans:C: import
16) In
android studio, callback that enable system to destroy an activity is
- onRestart
- onCreate
- onStop
- onDestroy
Ans:D: onDestroy
17) In android
studio, callback that is called when activity is visible is
- onCreate
- onDestroy
- onStop
- onStart
Ans:D: onStart
18) In android
studio, callback that is when activity is no longer visible is
- onDestroy
- onStop
- onRestart
- onResume
Ans:B: onStop
19) A type of
layout element that allows its children relative position depiction is
- RelativeLayout
- TextviewLayout
- LinearLayout
- ConstraintLayout
Ans:A: RelativeLayout
20) Right way to
write java comments is
- //It is a comment
- \It is a comment
- /It is a comment
- \\It is a comment
Ans:A: //It is a comment
Comments
Post a Comment