Listview with onclick event problem
Hi all I would like to create a listview in android with items populated from the database. On clicking each item, as in the message inbox, where opening a message will redirected to anther page with complete message, anoth开发者_如何转开发er intent should be started... How could we do this?
See ListActivity and OnItemClickListener. Google will give you plenty of examples.
check this
http://www.androidpeople.com/android-custom-listview-tutorial-part-2
onItemClick, call another activity.
I am a new man of Android developer,it's my pleasure to communicate with you. ^_^
First you should call setListAdapter() to see up a adapter for your Listview
Then you must set the listener for the Items of your list:setOnItemClickListener()
More: see the sample from Android developers Guide:Resources->Tutorials->Hello, Views ->ListView
Hope that my answer can help you.
精彩评论