0

i m new to android .

i m doing my final yr project in android.

Is the any way to use more elements in list view control....

for example: fetch more data frm database and add it at runtime. the formate may be


text text

text text


text text

text text


etc.....

refer this page for model https://play.google.com/store/apps/details?id=app.diaryfree&feature=search_result#?t=W251bGwsMSwxLDEsImFwcC5kaWFyeWZyZWUiXQ..

(in this page sample image for that application wil be given, like that report i need to display my data.)

is any other control there for that??? how to add runtime more assign more than one element value???

like this

and how to find which row is clicked?

thankz in advance

Naresh
  • 31
  • 1
  • 5

1 Answers1

1

you can create custom list views to format the listview the way you asked for. And cursors are a good way to fetch data from a database and pass it to a listview. you can use adapters for that.

a sample code for custom list view can be seen here

to find out which item is clicked you need to use onListItemClickListener like given here Android: onListItemClick in Activity

Community
  • 1
  • 1
Anurag Ramdasan
  • 4,189
  • 4
  • 31
  • 53