tags:

views:

311

answers:

2

I'm pretty new to android. I want to create a table in my Wapplication that will have three columns. Once column would have string, another would have a image and last column would have a integer. Again, I want to have table rows selectable. Can this be achieved by extending ListActivity ? What is the best to way to create such a table in android ?

+1  A: 

Yeah, you probably want a ListView that contains rows with a custom layout. There's an example here: http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/

synic
+2  A: 

Have you had a chance to go through the official NotePad tutorial? I am new to Android as well, and I would highly recommend it. It walks you through all the basics of creating a ListActivity with well documented code. To create your "table" you would change the layout (row_view.xml), created in Step 5 of Exercise 1, from a TextView to a RelativeLayout. Inside this RelativeLayout you would have a TextView for the string, an ImageView for the image, and another TextView for the integer. Hope that helps you get started.

joecan
I believe the official Android parlance for this is "Compound Control": http://developer.android.com/intl/es/guide/topics/ui/custom-components.html#compound
joecan