开发者

Using listactivity view to create table in android

I'm pretty new to android. I wan开发者_如何学编程t 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 ?


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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜