Esempio n. 1
0
  public static void setItemMKBbyPos(int position) {
    Item item = getItemByPos(position);

    itemDao = new ItemDAO(currentActivity);
    itemDao.open();
    itemDao.setMikbookTrue(item.getId());
    itemDao.close();
    refreshListItems();
  }
Esempio n. 2
0
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {

    Item item = getItem(position);

    if (convertView == null) {
      convertView = LayoutInflater.from(getContext()).inflate(layoutId, parent, false);
    }

    TextView id = (TextView) convertView.findViewById(R.id.itemId);
    TextView field_id = (TextView) convertView.findViewById(R.id.itemFieldId);
    TextView title = (TextView) convertView.findViewById(R.id.itemTitle);
    TextView mikbook = (TextView) convertView.findViewById(R.id.itemMkb);

    id.setText(String.valueOf(item.getId()));
    field_id.setText(String.valueOf(item.getField_id()));
    title.setText(item.getTitle());
    mikbook.setText((item.isMikbooked()) ? "V" : "X");

    return convertView;
  }