Code example for ListView

Methods: getItemAtPosition

0
        }; 
 
    } 
 
    public void onListItemClick(ListView l, View v, int position, long id) {
        User user = ((User) l.getItemAtPosition(position));
 
        startActivity(new Intent(getActivity(), UserActivity.class).putExtra(USER, user));
    } 
 
    @Override 
    public void onLoadFinished(Loader<List<User>> loader, List<User> items) {
        super.onLoadFinished(loader, items);
 
    } 
 
    @Override 
    protected int getErrorMessage(Exception exception) {
        return R.string.error_loading_users; 
    }