Search in sources :

Example 1 with MessageHolder

use of com.abewy.android.apps.klyph.adapter.holder.MessageHolder in project Klyph by jonathangerbaud.

the class MessageAdapter method bindData.

@Override
public void bindData(View view, GraphObject data) {
    MessageHolder holder = (MessageHolder) getHolder(view);
    Message message = (Message) data;
    holder.getMessageTextView().setText(EmojiUtil.getSpannableForText(holder.getMessageTextView().getContext(), message.getBody()));
    holder.getDateTextView().setText(DateUtil.getShortDateTime(message.getCreated_time()));
    //TextViewUtil.setElementClickable(getContext(view), holder.getAuthorName(), message.getAuthor_name(), message.getAuthor_id(), "user");
    ImageLoader.display(holder.getAuthorPicture(), message.getAuthor_pic(), KlyphUtil.getPlaceHolder(holder.getAuthorPicture().getContext()));
}
Also used : MessageHolder(com.abewy.android.apps.klyph.adapter.holder.MessageHolder) Message(com.abewy.android.apps.klyph.core.fql.Message)

Example 2 with MessageHolder

use of com.abewy.android.apps.klyph.adapter.holder.MessageHolder in project Klyph by jonathangerbaud.

the class MessageAdapter method attachViewHolder.

@Override
protected void attachViewHolder(View view) {
    ImageView authorPicture = (ImageView) view.findViewById(R.id.message_author_picture);
    TextView messageTV = (TextView) view.findViewById(R.id.message_body);
    TextView date = (TextView) view.findViewById(R.id.message_date);
    setHolder(view, new MessageHolder(authorPicture, messageTV, date));
}
Also used : MessageHolder(com.abewy.android.apps.klyph.adapter.holder.MessageHolder) TextView(android.widget.TextView) ImageView(android.widget.ImageView)

Aggregations

MessageHolder (com.abewy.android.apps.klyph.adapter.holder.MessageHolder)2 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 Message (com.abewy.android.apps.klyph.core.fql.Message)1