Compound Controls (?) Chapter 4
So far this book has been right on and very helpful in getting a newbie moving forward in Android development. I've hit an ignorance spot and what I think I need to do is not clear in the book.
I have a LinearLayout working fine. I want to define each item more discreetly; instead of a string of characters I want to have it subdivided into a graphic and two rows of strings that I can format differently. This is conceptually exactly the same as what you see in Android Market for an item - icon on left, text inthe middle, icon on the right. Another good example is Astro (tools->SDCard Usage). My need is simpler - a graphic and then two lines formatted differently (font, color)
------------------------------
JPG | some bigger text
| smaller and diff color
------------------------------
JPG | some bigger text
| smaller and diff color
------------------------------
JPG | some bigger text
| smaller and diff color
------------------------------
I think I'm close in trying to utilize Compound Controls. However the example in the book escapes me. I don't see what listing 4-6 accomplishes and more importantly, need tips on how to build a view in XML that supports this..
Am I barking up the right tree with Compound Controls? How can one specify the XML to achieve this? Any examples somewhere I can leverage?
Thanks in advance!
|