Ejemplo n.º 1
0
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {

    User user = profiles.get(position);
    LayoutInflater inflater = LayoutInflater.from(parent.getContext());
    ViewGroup view;
    if (convertView == null) {
      view = (ViewGroup) inflater.inflate(R.layout.profile_item, parent, false);
    } else view = (ViewGroup) convertView;
    setText(view, R.id.userDisplayName, user.getDisplayName());
    setText(view, R.id.userName, user.getUserName());
    displayProfileImage(view, R.id.profiel, user.getProfilePic());
    return view;
  }
Ejemplo n.º 2
0
  @Override
  public void requestDone(Object result) {
    activity.hideView(progress);
    // ArrayList<User> posts = (ArrayList<User>) result;
    // if (posts.size() == 0 && currentPage == 0) {
    // activity.showView(container.findViewById(R.id.noData));
    // return;
    // }

    ArrayList<User> posts = new ArrayList<User>();
    for (int i = 0; i < 3; i++) {
      User user = new User();
      user.setUserName("mraouf");
      user.setDisplayName("Melad Raouf");
      user.setProfilePic("/userfiles/20/6fcc4227-12b5-433c-993c-596f36e20fbc.jpg");
      posts.add(user);
    }
    addFriends(posts);

    activity.hideView(container.findViewById(R.id.noData));
    listView.onLoadMoreComplete();
    // listView.onRefreshComplete();
    notifyDataSetChanged();
  }