Book Image

Xamarin Mobile Application Development for Android, Second Edition

Book Image

Xamarin Mobile Application Development for Android, Second Edition

Overview of this book

Table of Contents (18 chapters)
Xamarin Mobile Application Development for Android Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Handling the ListView click event


When a user clicks on a row, the POI app will navigate to a detailed view in order to allow you to view and update the complete set of information. We will build the detailed view in the next chapter but will go ahead and discuss handling clicks now.

Clicks can be handled using a traditional event handler. The ListView item provides an ItemClick event handler, which accepts a ListView.ItemClickEventArgs parameter. The ListView.ItemClickEventArgs parameter provides the following information that can be used for processing the event:

Property

Description

ID

It is the ID for the data associated with the row that was clicked. This would be the value returned from GetItemId().

Position

It is the position in the ListView item of the row that was clicked.

View

It is the view associated with the row that was clicked. This would be the view returned from GetView().

Parent

It is the AdapterView architecture that contains the row that was clicked....