Ejemplo n.º 1
0
  @Override
  public int getItemViewType(int position) {
    final Cursor cursor = (Cursor) getItem(position);
    if (cursor == null) {
      return NONE;
    }
    final StatusModel s = StatusModel.from(cursor);
    if (s == null) {
      return NONE;
    }
    if (s.getType() == StatusModel.TYPE_MENTIONS
        || s.getSimpleText().contains("@" + AppContext.getScreenName())) {
      return MENTION;
    }

    return s.isSelf() ? SELF : NONE;
  }