Proper study guides for Abreast of the times Android Android Application Development certified begins with Android AND-401 preparation products which designed to deliver the Downloadable AND-401 questions by making you pass the AND-401 test at your first time. Try the free AND-401 demo right now.

Q16. Which of these is NOT recommended in the Android Developer's Guide as a method of creating an individual View? 

A. Create it by extending the android.view.View class 

B. Create it by extending already existing View classes such as Button or TextView 

C. Create it by copying the source of an already existing View class such as Button or TextView 

D. Create it by combining multiple Views 

Answer:


Q17. Which of the following is NOT true about a content provider? 

A. It manages access to structured data. 

B. It cannot be used from inside an Activity. 

C. It facilitates access to Android’s SQLite databases. 

D. To access data in it, method getContentResolver() of the application’s Context is used. 

Answer:


Q18. Which Which of the following does NOT correctly describe interface android.widget.Adapter? 

A. It is an object that acts as a bridge between a View.and underlying data for that view. 

B. It provides access to the data items. 

C. It provides access to deprecated ListView methods. 

D. It is responsible for making a View for each item in the data set. 

Answer:


Q19. What does the following line of code achieve? 

Intent intent = new Intent(FirstActivity.this, SecondActivity.class ); 

A. Creates a hidden Intent. 

B. Creates an implicit Intent. 

C. Create an explicit Intent. 

D. Starts an activity. 

Answer:


Q20. Consider the following code : 

@Override 

public void onCreateContextMenu(ContextMenu menu, View v, 

ContextMenuInfo menuInfo) { 

super.onCreateContextMenu(menu, v, menuInfo); 

menu.setHeaderTitle("Menu"); 

AdapterContextMenuInfo cmi = (AdapterContextMenuInfo) menuInfo; 

menu.add(1, cmi.position, 0, "Open file"); 

menu.add(2, cmi.position, 0, "Save file");} 

Which of the following best explains the code above? 

A. The code inflates an xml file into menu items. 

B. The code creates menu items for context menu programmatically. 

C. The code assign actions to menu items. 

D. The code Opens a menu resource file, modifies it, and saves the changes. 

Answer:


Q21. Consider the following code snippet: 

String[] result_columns = new String[]{KEY_ID, COL1, COL2}; 

Cursor allRows = myDatabase.query(true, DATABASE_TABLE, result_columns, 

null,null,null,null,null,null); 

Which of the following prints out the values of COL1 column correctly if the result is not empty? 

A. if (cursor.moveToFirst()) {do {System.out.println(cursor.getString(1));}while (cursor.moveToNext()); } 

B. do {System.out.println(cursor.getString(0));}while (cursor.moveToNext()); 

C. if (cursor.moveToFirst()) {do {System.out.println(cursor.getString(0));}while (cursor.moveToNext()); } 

D. if (cursor != null) {do {System.out.println(cursor.getString(1));}while (!cursor.isNull()); } 

Answer:


Q22. Which of the following is incorrect about intents? 

A. They can be used to start an Activity. 

B. They can be used to start a service. 

C. They can be used to start database insertion. 

D. They can be used to start a dialog-themed activity. 

Answer:


Q23. Which of the following Activity methods is invoked when the user clicks on an options menu item? 

A. onItemClicked 

B. onItemSelected 

C. onOptionsItemClicked 

D. onOptionsItemSelected 

Answer:


Q24. Which of the following applies a context menu on a ListView? (Choose two) 

A. ListView lv = getListView();lv.registerForContextMenu() 

B. ListView lv= getListView();registerForContextMenu(lv); 

C. ListView lv = (ListView) findViewById(R.id.list_view_id);registerForContextMenu(lv) 

D. getListView().setConextMenuEnabled(true) 

Answer: B,C 


Q25. An AsyncTask can be cancelled anytime from any thread. 

A. True 

B. False 

Answer:


Q26. 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. 

Answer:


Q27. Which of the following is true about attribute android:windowSoftInputMode of the <activity> tag in file AndroidManifest.xml? 

A. It specifies whether the window is in full screen or not. 

B. It adjusts how the main window of the activity interacts with keyboard. 

C. It adjusts how the window should be launched. 

D. It adjusts the window orientation. 

Answer:


Q28. Which of the following is not an Activity lifecycle call-back method? 

A. onStart 

B. onCreate 

C. onPause 

D. onBackPressed 

Answer:


Q29. Which of the following lines of code starts activity Activity2 from a current activity Activity1? 

A. Intent intent = new Intent(this,new Activity2());startActivity(intent); 

B. Intent intent = new Intent(new Activity2());startActivity(intent); 

C. Intent intent = new Intent (Activity1.class,Activity2.class);startActivity(intent); 

D. Intent intent = new Intent(this,Activity2.class);startActivity(intent); 

Answer:


Q30. What does the following line of code do? 

Toast toast = Toast.makeText(this,"Android ATC", Toast.LENGTH_LONG); 

toast.setGravity(Gravity.TOP|Gravity.RIGH, 0, 0); 

A. The toast will have it UI components place on the top-right corner. 

B. The toast will appear on the top-right corner. 

C. The toast will show the text message on top-right corner of the toast box. 

D. The toast will appear at the center of the screen at position (0,0), but aligned to the top-right corner. 

Answer: