@Override public void onClick(View view) { dialog.show(); User user = SharedPreferencesUtil.getUser(); try { tootService.sendTootOTWAsync(user.get_id(), id, context, new TootResponseListener(dialog)); } catch (ApiException e) { e.printStackTrace(); } }
@Override public boolean onLongClick(View v) { RemoveFriend userToRemove = new RemoveFriend(); userToRemove.setFriend(id); userToRemove.setId(SharedPreferencesUtil.getUser().get_id()); UserService userService = new UserServiceImpl(); ProgressDialog dialog = DialogUtil.getProgressDialog(context, "Removing user..."); dialog.show(); try { userService.removeFriendsAsynchronous( userToRemove, context, new RemoveFriendsResponseListener(dialog)); } catch (ApiException e) { e.printStackTrace(); } return true; }