What two methods you have to override when implementing Android option menus?
A. onCreateOptionsMenu, onCreateContextMenu
B. onCreateContextMenu, onContextItemSelected
C. onCreateOptionsMenu, onOptionsItemSelected
D. onCreateOptionsMenu, onContextItemSelected
正解:C
質問 2:
Which of the following is not an Android component (i.e. a point from which the system can enter your application)?
A. Activity
B. Layout
C. Service
D. Content Provider
正解:B
質問 3:
What are the main two types of thread in Android?
A. Main thread and worker threads.
B. Main thread and UI thread.
C. Activities and services.
D. Main thread and background process.
正解:A
質問 4:
Which of the following is true about this code snippet? (Choose two)
Intent intent = new Intent(Intent.ACTION_DIAL,Uri.parse("tel:555-1234")); startActivity(intent);
A. The system will perform an intent resolution to start the proper activity.
B. The system will not dial the number without adding permission CALL_PHONE.
C. This is an explicit intent that start the system's dialer.
D. The code will not compile.
正解:A,C
質問 5:
Which of these is the correct function of Traceview?
A. Displays graphically the call stack.
B. Displays graphically a memory acquisition and release log.
C. Displays a graphical task execution log.
D. Displays graphically the Ul state hierarchy.
正解:C
質問 6:
To add a new Activity to your application, you need to perform the following steps:
A. Create a Java class that extends View, set a layout, and add an Activity tag in AndroidManifest.xml.
B. Create a Java class that extends Activity, add an Activity tag in AndroidManifest.xml, and create a layout for the activity.
C. Add an Activity tag to AndroidManifest.xml, and add ACTIVITY permission.
D. Create layout resource only.
正解:B