bitrazor.com ...THE source for mediocre content                                      

How to Create a List with Selection Indicators

This document explains how to create a list of BText items that have a little icon next to them to indicate whether the user has selected them.  An example of this kind of behavior is the Channel Selection screen on TiVo; when you hit Select on a channel, the little icon next to the channel toggles on/off, and the focus moves to the next item.  Here's what the example looks like:


 
bullet Create a new project in Eclipse.
bullet Create a new package called com.tivo.examples
bullet Save these 3 files somewhere on your system:

           ListExample.java
           SelectableList.java
           musicnote.png

bullet Add these to the project by dropping them on the package.
bullet Add the HME and Bananas JARs to the project.
bullet Create a Simulator Run Configuration for this project.
bullet Click 'Run' to run it.

 

                                                         Last updated: August 25, 2006