Which of the following Activity life-cycle methods is called once the activity is no longer visible?

Which of the following Activity life-cycle methods is called once the activity is no longer visible?A . onStopB . onPauseC . onDestroyD . onHideView AnswerAnswer: A Explanation: References: Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study

September 24, 2019 No Comments READ MORE +

What does the following code do?

What does the following code do? dialog.getWindow().setFlags(LayoutParams.FLAG_BLUR_BEHIND, LayoutParams.FLAG_BLUR_BEHIND);A . When dialog is displayed the activity behind it will be blurred.B . When dialog is displayed the activity behind it will be dimmed.C . Any EditText behind the dialog will be disabled.D . When the dialog is displayed, the edges of...

September 23, 2019 No Comments READ MORE +

Which of the following is the correct way to add access permission to your application?

Which of the following is the correct way to add access permission to your application?A . Add a <uses-permission> tag as a child tag of the <manifest> tag in AndroidManifest.xmlB . Add a <add-permission> tag as a child tag of the <manifest> tag in AndroidManifest.xml.C . Add a <uses-permission> tag...

September 22, 2019 No Comments READ MORE +

Which of the following is not an Android component (i.e. a point from which the system can enter your application)?

Which of the following is not an Android component (i.e. a point from which the system can enter your application)?A . ServiceB . ActivityC . LayoutD . Content ProviderView AnswerAnswer: C Explanation: Here are the four types of app components: Activities, Services, Content providers, and Broadcast receivers. References: http://developer.android.com/guide/components/fundamentals.html

September 22, 2019 No Comments READ MORE +

Which of following is incorrect about the Toast class?

Which of following is incorrect about the Toast class?A . You cannot set a custom layout for a Toast.B . A Toast can only be created by an Activity classC . There is no need to close or hide a Toast, since it closes automatically.D . A Toast is displayed...

September 22, 2019 No Comments READ MORE +

Which package of the following does not have classes needed for Android network connections?

Which package of the following does not have classes needed for Android network connections?A . java.netB . org.apache.httpC . android.locationD . android.netView AnswerAnswer: C Explanation: The android.location package contains the framework API classes that define Android location-based (GPS) and related services. References: http://developer.android.com/reference/android/location/package-summary.html

September 22, 2019 No Comments READ MORE +

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

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);View AnswerAnswer: D

September 20, 2019 No Comments READ MORE +

What two methods you have to override when implementing Android option menus?

What two methods you have to override when implementing Android option menus?A . onCreateOptionsMenu, onCreateContextMenuB . onCreateContextMenu, onContextItemSelectedC . onCreateOptionsMenu, onOptionsItemSelectedD . onCreateOptionsMenu, onContextItemSelectedView AnswerAnswer: C Explanation: To specify the options menu for an activity, override onCreateOptionsMenu(). When the user selects an item from the options menu (including action items...

September 20, 2019 No Comments READ MORE +

Which of the following is the base class of all UI components?

Which of the following is the base class of all UI components?A . ListViewB . LayoutC . ViewD . ViewGroupView AnswerAnswer: C Explanation: View is the base class for android.widget subclasses, which instantiate fully-implemented UI objects. References: http://eagle.phys.utk.edu/guidry/android/androidUserInterface.html

September 19, 2019 No Comments READ MORE +

What is the parent class of all Activity widgets?

What is the parent class of all Activity widgets?A . ViewGroupB . LayoutC . ViewD . WidgetView AnswerAnswer: C Explanation: References: Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study

September 19, 2019 No Comments READ MORE +