Answer: D i, ii, iii, & iv
Description: getView, getItem, getItemId, and getCount are the mandatory functions that have to be implemented in Custom Adapter.
Answer: B Base Adapter is a common base class for any adapter that can be used in both ListView and Spinner. Base adapter is an abstract class which implements both ListAdapter and SpinnerAdapter interfaces.
While creating custom adapters, mostly programmers will extend this class.
Functions available in Base Adapter:
1. getCount()
2. getItem()
3. getList()
4. getView()
Description:
Answer: D both option 2 or option 3 can b used. Both will give the same effect.
Description:
Answer: C it will be not null if android is returning previous view which was created and went out of scope, for reuse.
Description: getView function has to create view for each row for adapterview and return it. But at a given point of time only few rows or elements of an adapterview will be visible to user. So it is unnecessary to create all the views if it is not visible to user. Rather we can reuse the old views which went out of scope. In order to reuse the previously created rows/ view which are currently not visible to user, they will be passed as second parameter to this function to reuse those views.
Programmer can check if(convertView != null) , then he or she can reuse that view.
Answer: A It will inflate the view two times in the parent adapter view.
Description: Don't pass true, other wise same view will be inflated to list view or destination two times.
Just pass false.
Answer: B It will not call onItemClickListener if there are any focus able items like radio button available in each row. to solve this make onFocusable="false" in the xml file of Row.
Description: It will not call onItemClickListener if there are any focus able items like radio button available in each row. to solve this make onFocusable="false" in the xml file of Row.