How to select more than one option from list in android xml file? Give an example.
- A ListView is created in XML and items are populated in them by using android:entries attribute on the list view elements that point to the <string-array> which are defined by the external resources in res/values/strings.xml.
- It uses an ArrayAdapter.
- It defines how the row is displayed . It can be a user defined layout defined in a XML file placed in the res/layout of the default ListView layout provided.
- It provides data to each row in a ListView.
- Specify android id, layout height and width as depicted in the following example.
<ListView android:id="@+id/ListView01" android:layout_height="wrap_content" android:layout_width="fill_parent"></ListView>