Premium

Associate Android Developer Certification Questions and Answer (Dumps and Practice Questions)



Question : You can create a custom view by extending class:

 : You can create a custom view by extending class:
1. android.widget.View

2. android.widget.LinearLayout

3. Access Mostly Uused Products by 50000+ Subscribers

4. android.content.Context

Correct Answer : Get Lastest Questions and Answer :
Explanation: This class represents the basic building block for user interface components. A View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.). The ViewGroup subclass is the base class for layouts, which are invisible containers that hold other Views (or other ViewGroups) and define their layout properties.

All of the views in a window are arranged in a single tree. You can add views either from code or by specifying a tree of views in one or more XML layout files. There are many specialized subclasses of views that act as controls or are capable of displaying text, images, or other content.

Once you have created a tree of views, there are typically a few types of common operations you may wish to perform:

Set properties: for example setting the text of a TextView. The available properties and the methods that set them will vary among the different subclasses of views. Note that properties that are known at build time can be set in the XML layout files.
Set focus: The framework will handled moving focus in response to user input. To force focus to a specific view, call requestFocus().
Set up listeners: Views allow clients to set listeners that will be notified when something interesting happens to the view. For example, all views will let you set a listener to be notified when the view gains or loses focus. You can register such a listener using setOnFocusChangeListener(android.view.View.OnFocusChangeListener). Other view subclasses offer more specialized listeners. For example, a Button exposes a listener to notify clients when the button is clicked.
Set visibility: You can hide or show views using setVisibility(int).
Note: The Android framework is responsible for measuring, laying out and drawing views. You should not call methods that perform these actions on views yourself unless you are actually implementing a ViewGroup.





Question : In which Activity life-cycle method you should do all of your normal static set up such as: creating views and bind data to lists?

 : In which Activity life-cycle method you should do all of your normal static set up such as: creating views and bind data to lists?
1. onResume()

2. onStart()

3. Access Mostly Uused Products by 50000+ Subscribers

4. onPause()

Correct Answer : Get Lastest Questions and Answer :
Explanation: onCreate() Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity's previously frozen state, if there was one.
Always followed by onStart().




Question : Which of the following lines of code starts activity Activity from a current activity Activity?
 : Which of the following lines of code starts activity Activity from a current activity Activity?
1. Intent intent = new Intent(this,new Activity2());
startActivity(intent);

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

3. Access Mostly Uused Products by 50000+ Subscribers
startActivity(intent);

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

Correct Answer : Get Lastest Questions and Answer :
Explanation: The startActivity(Intent) method is used to start a new activity, which will be placed at the top of the activity stack. It takes a single argument, an Intent, which describes the activity to be executed.

Sometimes you want to get a result back from an activity when it ends. For example, you may start an activity that lets the user pick a person in a list of contacts; when it ends, it returns the person that was selected. To do this, you call the startActivityForResult(Intent, int) version with a second integer parameter identifying the call. The result will come back through your onActivityResult(int, int, Intent) method.

When an activity exits, it can call setResult(int) to return data back to its parent. It must always supply a result code, which can be the standard results RESULT_CANCELED, RESULT_OK, or any custom values starting at RESULT_FIRST_USER. In addition, it can optionally return back an Intent containing any additional data it wants. All of this information appears back on the parent's Activity.onActivityResult(), along with the integer identifier it originally supplied.

If a child activity fails for any reason (such as crashing), the parent activity will receive a result with the code RESULT_CANCELED.


Related Questions


Question : Which function is not supported by the "android" command?

 : Which function is not supported by the
1. The SDK Update function

2. Functions to create and edit an Android Virtual Device (AVD)

3. Access Mostly Uused Products by 50000+ Subscribers

4. Functions to create and delete an Android project


Question : Which is the permission added to the Android manifest file in order to access GPS?

 : Which is the permission added to the Android manifest file in order to access GPS?
1. ACCESS_FINE_LOCATION

2. ACCESS_COARSE_LOCATION

3. Access Mostly Uused Products by 50000+ Subscribers

4. ACCESS MOCK LOCATION


Question : Which of these is the incorrect explanation of the adb command?

 : Which of these is the incorrect explanation of the adb command?
1. The "adb start-server" command starts the adb server.

2. The "adb devices" command lists connected handsets and emulators.

3. Access Mostly Uused Products by 50000+ Subscribers

4. You install an apk with the "adb install" command


Question : Which does not have a lifecycle?

 : Which does not have a lifecycle?
1. Service

2. MediaPlayer

3. Access Mostly Uused Products by 50000+ Subscribers

4. Activity


Question : Which of these is the correct explanation of SQLite?

 : Which of these is the correct explanation of SQLite?
1. It is an object database.

2. It is client-server format.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It can be accessed by other applications through ContentProvider


Question : Which is the processing that cannot be executed by using the emulator during development?

 : Which is the processing that cannot be executed by using the emulator during development?
1. Displaying information of the heap and threads.

2. Emulation of outgoing calls

3. Access Mostly Uused Products by 50000+ Subscribers

4. Receiving E-mail