예제 #1
0
 public void onSearchResult(int id) {
   int position = arrayAdapter.getPositionById(id);
   int index = AppToServer.getAllUserId().indexOf(id);
   if (index < 0) return;
   String o_nname = AppToServer.getAllUserNname().get(index);
   String o_uname = (String) AppToServer.getAllUserUname().get(index);
   startChat(this, id, o_uname, o_nname, position);
 }
예제 #2
0
  void changeLocalDP(int id, Drawable img) {
    int pos = arrayAdapter.getPositionById(id);
    if (pos < 0) return;

    userinfo_element element = ((userinfo_element) arrayAdapter.getItem(pos));
    /** **********Not Working*********** */
    element.setBitmapDp(img);
    ImageView iv = (element).getImageView_dp();
    if (iv != null) iv.setImageDrawable(img);
  }
예제 #3
0
  void refreshAdapterOnline() {
    List<Integer> OnlineID = AppToServer.getOnlineIDS();
    if (OnlineID == null) return;

    for (int i = 0; i < arrayAdapter.getCount(); i++) {
      userinfo_element item = arrayAdapter.getItem(i);
      item.setIsOnline(false);
    }
    for (int i = 0; i < OnlineID.size(); i++) {
      int pos = arrayAdapter.getPositionById((int) OnlineID.get(i));

      if (pos >= 0) {
        userinfo_element item = arrayAdapter.getItem(pos);
        item.setIsOnline(true);
      }
    }
    arrayAdapter.notifyDataSetChanged();
  }