Ejemplo n.º 1
0
  @Override
  public void bindView(View row, Context context, final Cursor cursor) {
    final StatusModel s = StatusModel.from(cursor);
    View root = row;
    final ItemView view = (ItemView) root.findViewById(R.id.list_item);

    setColor(cursor, view);
    UIHelper.setContent(view, s);
    UIHelper.setMetaInfo(view, s);
    UIHelper.setImageClick(view, s.getUserId());

    String headUrl = s.getUserProfileImageUrl();
    mImageLoader.displayImage(headUrl, view.getImageView());
  }
Ejemplo n.º 2
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;
  }
Ejemplo n.º 3
0
 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   final Cursor cursor = (Cursor) parent.getItemAtPosition(position);
   if (cursor != null) {
     final StatusModel s = StatusModel.from(cursor);
     if (s != null) {
       UIController.goStatusPage(getActivity(), s);
     }
   }
 }