I have one custom list for displaying employee pic and name and i want to navigate to next activity when list item is clicked, In next activity i want to display details of employee dynamically from web service!! how to do that please give some idea or link??
thank you in advance!
Wants a custom page to display employee detailed profile when clicked on listview employee
358 views Asked by AndroidSeeker At
1
That's a very broad question which will take a long time to answer. There are a few ways you could do it, but hopefully this short answer will help and at least point you in a direction.
I'm guessing you already have an adapter with a list of all employees (List or whatever) powering your listview. You should create a public method in your adapter to take in the position, and return a unique id referencing your employee. Note a unique id is not necessarily the same as the position of the item.
Here's a crude example:
Then implement an onItemClickListener on your listview. The method can then call the adapter to retrieve a unique id. This unique ID is what you would pass via intent to your new activity. Your new activity will lookup the employee details and display them.
Hope this helps.