private ListItem cursorToItem(Cursor cursor) {
    ListItem item = new ListItem();
    item.id = cursor.getInt(0);
    item.name = cursor.getString(1);
    item.priority = cursor.getInt(2);
    item.quantity = cursor.getInt(3);
    item.unit = cursor.getString(4);
    item.price = cursor.getInt(5);
    item.money = cursor.getString(6);
    item.place = cursor.getString(10);
    item.due_date = cursor.getString(7);
    item.alarm = cursor.getString(8);
    item.status = cursor.getInt(9);
    item.doneDate = cursor.getLong(11);

    return item;
  }
コード例 #2
0
  protected static ListItem toListItem(Status tweet) {
    ListItem item1 = new ListItem();

    item1.image = defaultImage;
    item1.id = tweet.getId();

    item1.screenName = tweet.getUser().getScreenName();
    item1.name = tweet.getUser().getName();
    item1.comment = tweet.getText();

    item1.geoLocation = tweet.getGeoLocation();
    item1.profileImageURL = tweet.getUser().getProfileImageURL().toString();
    item1.date = diffDate(tweet.getCreatedAt());

    //
    item1.source = tweet.getSource();

    return item1;
  }