Premium

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



Question : Which of the following is NOT a correct constructer for ArrayAdapter?

 : Which of the following is NOT a correct constructer for ArrayAdapter?
1. ArrayAdapter(Context context)

2. ArrayAdapter (Context context, int recourse)

3. ArayAdpater (Context context , int resource, int textViewResourceId)

4. ArrayAdapter (Context context , int resource, List items)

Correct Answer : 3
Explanation: ArrayAdapter(Context context, int resource)
Constructor
ArrayAdapter(Context context, int resource, int textViewResourceId)
Constructor
ArrayAdapter(Context context, int resource, T[] objects)
Constructor
ArrayAdapter(Context context, int resource, int textViewResourceId, T[] objects)
Constructor
ArrayAdapter(Context context, int resource, List objects)
Constructor
ArrayAdapter(Context context, int resource, int textViewResourceId, List objects)
Constructor




Question : Which of the following add a click listener to items in a listView?

 : Which of the following add a click listener to items in a listView?
1. onClickListener.

2. onItemClickListener.

3. onItemClicked.

4. onListItemClickListener

Correct Answer : 2
Explanation: Use OnItemClickListener

ListView lv = getListView();
lv.setOnItemClickListener(new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView adapter, View v, int position, long arg3)
{
String value = (String)adapter.getItemAtPosition(position);
// assuming string and if you want to get the value on click of list item
// do what you intend to do on click of listview row
}
});
When you click on a row a listener is fired. So you setOnClickListener on the listview and use the annonymous inner class OnItemClickListener.

You also override onItemClick. The first param is a adapter. Second param is the view. third param is the position ( index of listview items).

Using the position you get the item .

Edit : From your comments i assume you need to set the adapter o listview

So assuming your activity extends ListActivtiy

setListAdapter(adapter);
Or if your activity class extends Activity

ListView lv = (ListView) findViewById(R.id.listview1);
//initialize adapter
lv.setAdapter(adapter);




Question : Which of the following makes a ListView Clickable?

 : Which of the following makes a ListView Clickable?
1. setClickable(true)

2. setVisibility(View.Visible)

3. setEnabled(true)

4. setItemsEnabled(true)

Correct Answer : 3
Explanation:


Related Questions


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

 : Which of these is NOT recommended in the Android Developer's Guide as a method of creating an individual View?
1. Create by extending the android.view.View class.

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

3. Access Mostly Uused Products by 50000+ Subscribers

4. Create by combining multiple Views.


Question : Which of these is the incorrect explanation of the Android SDK and AVD Manager?

 : Which of these is the incorrect explanation of the Android SDK and AVD Manager?
1. They are provided from version 1.6 of the SDK. Up to Version 1.5, there was an AVD Manager but it lackedSDK management functions.

2. You can create and startup AVD, and on startup you can delete user data up to that point.

3. Access Mostly Uused Products by 50000+ Subscribers

4. The development tools that can be downloaded from Android SDK and AVD Manager are SDK
Androidplatform, NDK-platform, emulator images, and USB drivers for handsets.


Question : Which of these is the correct explanation regarding the following methods?
(1)android.content.Context.sendBroadcast
(2)android.content.Context.startActivity

 : Which of these is the correct explanation regarding the following methods?
1. Both methods are defined by overloading.

2. Both methods throw an exception.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Both methods are able to broadcast an Intent.


Question : Which of the following is incorrect about ProgressDialog?

 : Which of the following is incorrect about ProgressDialog?
1. ProgressDialog inherits from the AlertDialog class.

2. ProgressDialog can be set as 2 types of style: STYLE_HORIZONTAL and STYLE_SPINNER.

3. Access Mostly Uused Products by 50000+ Subscribers

4. ProgressDialog can be freely configured to use a Drawable class to display as its progress bar.


Question : Which of these is the correct function of Traceview?

 : Which of these is the correct function of Traceview?
1. Displays a graphical task execution log.

2. Displays graphically a memory acquisition and release log

3. Access Mostly Uused Products by 50000+ Subscribers

4. Displays graphically the Ul state hierarchy


Question : 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?
1. Add a tag as a child tag of the tag in AndroidManifest.xml

2. Add a tag as a child tag of the tag in AndroidManifest.xml.

3. Access Mostly Uused Products by 50000+ Subscribers

4. add a tag as a child tag of the tag in AndroidManifest.xml