Q. What is the difference between a ListView control's setOnClickListener() method and the setOnItemClickListener() method?

A. The setOnClickListener() method listens for a click anywhere in the entire ListView control. The setOnItemClickListener() method listens for a click in a specific View item within the ListView control.

Q. There is no default item selected in the ListView control I created. How can I have it default to a specific item?

A. To have a ListView control highlight a specific list item by default, use the setSelection() method.

Was this article helpful?

0 0

Post a comment