Addres book like Spinner/ListView items

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Addres book like Spinner/ListView items

Postby keylimepai » Wed May 27, 2009 7:21 pm


So, what I'm trying to do is to recreate a ListView / Spinner with a title and some information about it, in a way that's similar to the formatting of the address book.

That is, it would be like this:

Use: Keeps the doctor away

I'm sure the secret lies in the resource definition, but I'm really quite new to laying everything out in the Android XML, and thus am not even sure what to -call- this to try and search for an example.

Thank you very much for any help!


EDIT: I should answer my own question =)

It can be done two ways! First, if the data is static, basic formatting can be done with:

Code: Select all
   <string-array name="...">
      <item>Applen<SMALL><b>Use:</b>Keeps the doctor away</SMALL></item>

Or more complicated formatting can be done with the "Spannable" class - ... nable.html

Found on: ... ectingtext
Junior Developer
Junior Developer
Posts: 14
Joined: Wed May 27, 2009 7:14 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 9 guests