


Here are our arrays: ĭesign & Build a 1980s iOS Phone App: Design Comp SlicingĬreate a Brick Breaker Game with the Corona SDK: Game ControlsĮxporting Graphics for Mobile Apps: PNG or JPEG?īuild a Titanium Mobile Pizza Ordering App: Order Form SetupĬreate a Brick Breaker Game with the Corona SDK: Application SetupĪndroid Tablet Virtual Device Configurationsīuild a Titanium Mobile Pizza Ordering App: Topping Selectionĭesign & Build a 1980s iOS Phone App: Interface Builder Setup Fill in the arrays with valid titles and valid URLs from the Mobiletuts+ website. Name one array "tut_titles" and the other "tut_links". Create two string-array resources in your project (you can add them to strings.xml or a separate arrays.xml file, your choice). Later on, you could always replace the array with some sort of live data source. We’ll use an array implementation for this application. An adapter can be used to read from a database, array, or other data source. ListView controls are design to load data from a data source. Step 2: Populating the ListView with Data The text size plus the padding attributes ensure that each list item is a big enough touch target for the average human finger on an average sized screen. Add a new layout resource file to your project named list_item.xml which represents the template layout for each item in the list. Therefore, the template for each list item need only have a TextView control. Each title will be a single item in the ListView. We want to display a list of article titles. A ListView control consists of repeating items, each with the same layout (a template for an item).

Step 1: Designing the List ScreenĪctually, there is very little design work here. We're using a target API Level of 10 (Android 2.3.3). This Activity must extend the ListActivity class, which is a special Activity class that helps manage a ListView control. We've named ours MT-List, with a starting activity named TutListActivity. Step 0: Creating a ProjectĬreate a new Android project in Eclipse. The final open-source code is available for download on Google code hosting. The pacing of this tutorial is going to be faster than some of our beginning tutorials you may have to review some of our other tutorials on this site or even in the Android API reference if you are unfamiliar with basic Android controls or concepts. The application itself will be very simple: it will display a list of article titles which, when clicked, display the article's content. You'll use several of these in conjunction with a ListView in today’s tutorial. Over the last several months, you've seen many tutorials covering various layout controls. In this Mobiletuts+ tutorial, we'll show you how to use a ListView to browse a list of articles! The ListView is one of the most useful view controls available on the Android platform for the display of variable amounts of data.
