Exemplo n.º 1
0
 public MessagesAdapter(ViewGroup view, BaseActivity activity) {
   this.activity = activity;
   currentPage = 0;
   activity.model.getFriends(activity.util.user.getComboUserID(), currentPage, "GetFriends", this);
   progress = view.findViewById(R.id.progress);
   listView = (LoadMoreListView) view.findViewById(R.id.listView);
   //		listView.setOnRefreshListener(this);
   listView.setOnLoadMoreListener(this);
   container = view;
   profiles = new ArrayList<User>();
 }
Exemplo 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();
  }