1.What is true about a Context?
Select one:
a. You can access activity's context directly from anonymous inner classes like button click listeners
b. Activity and Service will have its own Context
c. Both of the above
d. None of the above
2.Which callback should be used whenever an activity is about to be killed?
Select one:
a. onActivityDestroyed()
b. onRestoreInstanceState()
c. onSaveInstanceState()
d. Any of the above
3.Correct way to provide current context in an anonymous inner class is/are
Select one:
a. Use 'Context.this' instead of 'this'
b. Use getApplicationContext() instead of 'this'
c. Explicitly use the class name 'MenuScreen.this'
Select one:
a. resultCode
b. data
c. requestCode
Select one:
a. Activities contain intents
b. Activities contain views and fragments
c. Views contain Fragments
Select one:
a. Run the operation as a thread
b. Run the operation as a service
c. Run the operation as a service or a thread
Select one:
a. BUTTON_NEUTRAL, BUTTON_NEGATIVE, BUTTON_POSITIVE
b. BUTTON_POSITIVE, BUTTON_NEUTRAL, BUTTON_NEGATIVE
c. BUTTON_POSITIVE, BUTTON_NEGATIVE, BUTTON_NEUTRAL
Select one:
a. layout_centerInParent
b. layout_centerHorizontal
c. layout_centerVertical
Select one:
a. Dont start the package name with a domain you own like com.mydomain
b. Dont start the package name with com.example
c. Start the package name with com.android
Select one:
a. gives a compilation error
b. based on local resources and the application’s local R.java package
c. Resolves from the system namespaces like "android"
Select one:
a. <item type="id" name="text1">
b. <string name="text1">hello 1</string>
c. %lt;string type="pre" name="text1">hello 1%lt;/string>
Select one:
a. using the URI "content://.../../employee/23"
b. managedQuery("content://.../../employee" ,null ,"_empId=?" ,new String[] {23} ,null);
c. managedQuery("content://.../../employee" ,null ,"_empId=?" ,new String[] {23} ,"_empName ASC");
Select one:
a. intent.putExtras(Bundle bundle);
b. intent.putExtras(Intent intent);
c. intent.putExtra(String name, double value)
Select one:
a. ACTION_CALL
b. ACTION_DELETE
c. ACTION_SHUTDOWN
Select one:
a. To set styles on the text dynamically at runtime
b. To check spelling of the user entered text
c. To get the height, width, padding, margin of the textbox
d. All of the above
16.What is the right way to find an existing fragment running in your application?
Select one:
a. FragmentManager.findFragmentByTag()
b. FragmentManager.getFragment()
c. FragmentManager.findFragmentById()
d. All of the above
17.Can a dialog fragment show another dialog fragment? If yes how?
Select one:
a. No, because it will create a layering issue.
b. Yes. By saving the existing transaction on the back stack.
c. Yes. By opening a child dialog fragment overlaying the existing one.
d. Yes. By opening a child dialog fragment destroying the existing one.
18.How best do you design a pattern so that all your activities can share a common action/menu bar?
Select one:
a. Use fragments
b. Use home icon of an action bar to interact with the menu infrastructure.
c. Use a tabbed action bar
d. Any of the above
19.The Debug Perspective in Eclipse does NOT give you access to the following tab:
Select one:
a. Debug - Displays previously and currently debugged Android applications and its currently running threads
b. Variables - When breakpoints are set, displays variable values during code execution
c. Breakpoints - Displays a list of the set breakpoints in your application code
d. Devices - Shows the list of devices and AVDs that are connected to ADB.
20.What is the category name that should be used in AndroidManifest.xml for a PreferenceActivity?
Select one:
a. android.intent.category.PREFERENCEACTIVITY
b. android.intent.category.PREFERENCE
c. android.intent.category.ACTIVITYPREFS
d. android.intent.category.DEFAULT
Select one:
a. You can access activity's context directly from anonymous inner classes like button click listeners
b. Activity and Service will have its own Context
c. Both of the above
d. None of the above
2.Which callback should be used whenever an activity is about to be killed?
Select one:
a. onActivityDestroyed()
b. onRestoreInstanceState()
c. onSaveInstanceState()
d. Any of the above
3.Correct way to provide current context in an anonymous inner class is/are
Select one:
a. Use 'Context.this' instead of 'this'
b. Use getApplicationContext() instead of 'this'
c. Explicitly use the class name 'MenuScreen.this'
d. All of the above
Select one:
a. resultCode
b. data
c. requestCode
d. None of the above
Select one:
a. Activities contain intents
b. Activities contain views and fragments
c. Views contain Fragments
d. Applications contain activities, services, implicit intents and content providers
Select one:
a. Run the operation as a thread
b. Run the operation as a service
c. Run the operation as a service or a thread
d. Run the operation as a service or as a thread with keepAlive() call
Select one:
a. BUTTON_NEUTRAL, BUTTON_NEGATIVE, BUTTON_POSITIVE
b. BUTTON_POSITIVE, BUTTON_NEUTRAL, BUTTON_NEGATIVE
c. BUTTON_POSITIVE, BUTTON_NEGATIVE, BUTTON_NEUTRAL
d. BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE
Select one:
a. layout_centerInParent
b. layout_centerHorizontal
c. layout_centerVertical
d. All of the above
Select one:
a. Dont start the package name with a domain you own like com.mydomain
b. Dont start the package name with com.example
c. Start the package name with com.android
d. All of the above
Select one:
a. gives a compilation error
b. based on local resources and the application’s local R.java package
c. Resolves from the system namespaces like "android"
d. Resolves at runtime with available namespaces
Select one:
a. <item type="id" name="text1">
b. <string name="text1">hello 1</string>
c. %lt;string type="pre" name="text1">hello 1%lt;/string>
d. None of the above
Select one:
a. using the URI "content://.../../employee/23"
b. managedQuery("content://.../../employee" ,null ,"_empId=?" ,new String[] {23} ,null);
c. managedQuery("content://.../../employee" ,null ,"_empId=?" ,new String[] {23} ,"_empName ASC");
d. All of the above
Select one:
a. intent.putExtras(Bundle bundle);
b. intent.putExtras(Intent intent);
c. intent.putExtra(String name, double value)
d. intent.putExtra(String name, Intent intent)
Select one:
a. ACTION_CALL
b. ACTION_DELETE
c. ACTION_SHUTDOWN
d. ACTION_SYNC
Select one:
a. To set styles on the text dynamically at runtime
b. To check spelling of the user entered text
c. To get the height, width, padding, margin of the textbox
d. All of the above
16.What is the right way to find an existing fragment running in your application?
Select one:
a. FragmentManager.findFragmentByTag()
b. FragmentManager.getFragment()
c. FragmentManager.findFragmentById()
d. All of the above
17.Can a dialog fragment show another dialog fragment? If yes how?
Select one:
a. No, because it will create a layering issue.
b. Yes. By saving the existing transaction on the back stack.
c. Yes. By opening a child dialog fragment overlaying the existing one.
d. Yes. By opening a child dialog fragment destroying the existing one.
18.How best do you design a pattern so that all your activities can share a common action/menu bar?
Select one:
a. Use fragments
b. Use home icon of an action bar to interact with the menu infrastructure.
c. Use a tabbed action bar
d. Any of the above
19.The Debug Perspective in Eclipse does NOT give you access to the following tab:
Select one:
a. Debug - Displays previously and currently debugged Android applications and its currently running threads
b. Variables - When breakpoints are set, displays variable values during code execution
c. Breakpoints - Displays a list of the set breakpoints in your application code
d. Devices - Shows the list of devices and AVDs that are connected to ADB.
20.What is the category name that should be used in AndroidManifest.xml for a PreferenceActivity?
Select one:
a. android.intent.category.PREFERENCEACTIVITY
b. android.intent.category.PREFERENCE
c. android.intent.category.ACTIVITYPREFS
d. android.intent.category.DEFAULT