Example #1
0
 @SuppressWarnings("deprecation")
 @Override
 protected void onListItemClick(ListView l, View v, int position, long id) {
   List<CommandAction> tempCommandActions =
       commandActionDao.queryBuilder().where(CommandActionDao.Properties.CommandId.eq(id)).list();
   String ids = "", statuses = "", delim = "";
   final int size = tempCommandActions.size();
   for (int i = 0; i < size; i++) {
     Action tempAction = actionDao.load(tempCommandActions.get(i).getActionId());
     ids += (delim + tempAction.getDeviceId());
     statuses += (delim + tempAction.getStatus());
     delim = ",";
   }
   new Request().execute(getServerAddress(), "edit", ids, statuses);
   cursor.requery();
 }
Example #2
0
 @Override
 public int compare(Action o1, Action o2) {
   return o2.getDeviceId() > o1.getDeviceId() ? 1 : -1;
 }