Tuesday, February 11, 2014

How to get more information by clicking listview item in the item


            
I do now is a client of the news function, after coming from the home page ready to adopt two ListView to show news headlines, and then displays the contents of the selected three pages of news, get listview and news content is through requests that the server returns data to json format, there are two problems:
1 listview content acquisition process, the server needs to return some of what information is only required to return the titles of all articles on it? In addition to the title or preferably also returned with some other information, such as id, etc.?
2, if the server returns both the article title, another article id (to list >) returned to form, how to display only the title without displaying listview id?
3, how to select a title of the article to get this article id (id check for the next three page article details through to prepare)?
Reply:
1 What do you want to display, what the server returns usually put objects into a list, and then return

2 to read
object by way of
3 for each row in which getView add an onclick event, index value of the pass list, to the third page you can get the index, then list.get (index) way to get the current row is located in the list click on the first several objects, then you can get this object, the content is displayed in need

No comments:

Post a Comment