Esempio n. 1
0
  @Override
  public View getView() {

    if (rootView == null) rootView = inflater.inflate(R.layout.drawer_user_item, null, false);

    title = ((TextView) rootView.findViewById(R.id.main_drawer_user_item_name));
    title.setText(user.firstName + " " + user.lastName);

    onlineView = rootView.findViewById(R.id.main_drawer_user_item_img_online);

    //        requestManager
    //                .load(user.pic)
    //                .transform(new CircleTransform(context))
    //                .into((ImageView) rootView.findViewById(R.id.main_drawer_user_item_ava));
    IMGLoader.load(user.pic, (ImageView) rootView.findViewById(R.id.main_drawer_user_item_ava));

    rootView.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            click(user);
          }
        });

    onlineView.setVisibility(
        DataWrapper.get().friendsOnline.contains(user.userId) ? View.VISIBLE : View.GONE);
    setOpened(false);

    return rootView;
  }
 private String[] getAllUsersNames(List<Long> uids) {
   String[] names = new String[uids.size()];
   for (long uid : uids) {
     final User user = DataWrapper.get().allFriendsHash.get(uid);
     if (user != null) names[uids.indexOf(uid)] = user.firstName + " " + user.lastName;
   }
   return names;
 }