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

Creating the POI list row layout


We now turn our attention to the layout for each row in the ListView widget. The Android platform provides a number of default layouts out of the box that can be used with a ListView widget:

Layout

Description

SimpleListItem1

A single line with a single caption field

SimpleListItem2

A two-line layout with a larger font and a brighter text color for the first field

TwoLineListItem

A two-line layout with an equal sized font for both lines and a brighter text color for the first line

ActivityListItem

A single line of text with an image view

All of the preceding three layouts provide a pretty standard design, but for more control over content layout, a custom layout can also be created, which is what is needed for poiListView.

To create a new layout, perform the following steps:

  1. In the Solution pad, navigate to Resources | Layout, right-click on it, and navigate to Add | New File.

  2. Select Android from the list on the left-hand side, Android Layout...