In this tutorial i will be demonstrating how to build simple android ListView . This article is about creating listview and launching new activity on selecting single list item. Now follow the coding 1. Create the project 2. Extend your MainActivity class from ListActivity 3. Now we need a string resources file to store all list item labels. So create an XML file under values folder and name it as list_data.xml and paste the following code. ( Right Click on res/values ⇒ New ⇒ Android XML File ) list_data.xml <? xml version= "1.0" encoding= "utf-8" ?> <resources> <string-array name= "android_versions"> <item> Cupcake </item> <item> Donut </item> <item> Eclair </item> <item> Froyo </item> ...
Learn with Samples