Search in sources :

Example 6 with PicturePrimarySecondaryTextHolder

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

the class NotificationAdapter method attachHolder.

@Override
protected void attachHolder(View view) {
    ImageView userPicture = (ImageView) view.findViewById(R.id.picture);
    TextView notificationTitle = (TextView) view.findViewById(R.id.primary_text);
    TextView notificationTime = (TextView) view.findViewById(R.id.secondary_text);
    View divider = (View) view.findViewById(R.id.divider);
    setHolder(view, new PicturePrimarySecondaryTextHolder(userPicture, notificationTitle, notificationTime, divider));
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) ProfileImageView(com.abewy.android.apps.klyph.widget.ProfileImageView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) View(android.view.View) ProfileImageView(com.abewy.android.apps.klyph.widget.ProfileImageView) PicturePrimarySecondaryTextHolder(com.abewy.android.apps.klyph.adapter.holder.PicturePrimarySecondaryTextHolder)

Example 7 with PicturePrimarySecondaryTextHolder

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

the class PageAdapter method mergeViewWithData.

@Override
protected void mergeViewWithData(View view, GraphObject data) {
    super.mergeViewWithData(view, data);
    PicturePrimarySecondaryTextHolder holder = (PicturePrimarySecondaryTextHolder) getHolder(view);
    //holder.getPicture().setImageDrawable(null);
    Page page = (Page) data;
    holder.getPrimaryText().setText(page.getName());
    holder.getSecondaryText().setText(page.getType().toUpperCase());
    if (placeHolder == -1)
        placeHolder = AttrUtil.getResourceId(getContext(holder.getPicture()), R.attr.squarePlaceHolderIcon);
    loadImage(holder.getPicture(), page.getPic(), placeHolder, data);
}
Also used : Page(com.abewy.android.apps.klyph.core.fql.Page) PicturePrimarySecondaryTextHolder(com.abewy.android.apps.klyph.adapter.holder.PicturePrimarySecondaryTextHolder)

Example 8 with PicturePrimarySecondaryTextHolder

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

the class PageAdapter method attachHolder.

@Override
protected void attachHolder(View view) {
    ImageView pagePicture = (ImageView) view.findViewById(R.id.picture);
    TextView pageName = (TextView) view.findViewById(R.id.primary_text);
    TextView pageCategory = (TextView) view.findViewById(R.id.secondary_text);
    setHolder(view, new PicturePrimarySecondaryTextHolder(pagePicture, pageName, pageCategory));
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) PicturePrimarySecondaryTextHolder(com.abewy.android.apps.klyph.adapter.holder.PicturePrimarySecondaryTextHolder)

Example 9 with PicturePrimarySecondaryTextHolder

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

the class FriendRequestAdapter method attachHolder.

@Override
protected void attachHolder(View view) {
    ImageView userPicture = (ImageView) view.findViewById(R.id.picture);
    TextView notificationTitle = (TextView) view.findViewById(R.id.primary_text);
    TextView notificationTime = (TextView) view.findViewById(R.id.secondary_text);
    setHolder(view, new PicturePrimarySecondaryTextHolder(userPicture, notificationTitle, notificationTime));
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) PicturePrimarySecondaryTextHolder(com.abewy.android.apps.klyph.adapter.holder.PicturePrimarySecondaryTextHolder)

Example 10 with PicturePrimarySecondaryTextHolder

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

the class FriendRequestAdapter method mergeViewWithData.

@Override
protected void mergeViewWithData(View view, GraphObject data) {
    super.mergeViewWithData(view, data);
    PicturePrimarySecondaryTextHolder holder = (PicturePrimarySecondaryTextHolder) getHolder(view);
    //holder.getPicture().setImageDrawable(null);
    FriendRequest friendRequest = (FriendRequest) data;
    holder.getPrimaryText().setText(friendRequest.getUid_from_name());
    if (friendRequest.getMessage().length() > 0) {
        holder.getSecondaryText().setText(DateUtil.timeAgoInWords(getContext(view), friendRequest.getMessage()));
        holder.getSecondaryText().setVisibility(View.VISIBLE);
    } else {
        holder.getSecondaryText().setVisibility(View.GONE);
    }
    loadImage(holder.getPicture(), friendRequest.getUid_from_pic(), data);
}
Also used : FriendRequest(com.abewy.android.apps.klyph.core.fql.FriendRequest) PicturePrimarySecondaryTextHolder(com.abewy.android.apps.klyph.adapter.holder.PicturePrimarySecondaryTextHolder)

Aggregations

PicturePrimarySecondaryTextHolder (com.abewy.android.apps.klyph.adapter.holder.PicturePrimarySecondaryTextHolder)14 ImageView (android.widget.ImageView)7 TextView (android.widget.TextView)7 Friend (com.abewy.android.apps.klyph.core.fql.Friend)2 ProfileImageView (com.abewy.android.apps.klyph.widget.ProfileImageView)2 View (android.view.View)1 RelativeLayout (android.widget.RelativeLayout)1 FriendRequest (com.abewy.android.apps.klyph.core.fql.FriendRequest)1 Group (com.abewy.android.apps.klyph.core.fql.Group)1 Notification (com.abewy.android.apps.klyph.core.fql.Notification)1 Page (com.abewy.android.apps.klyph.core.fql.Page)1 Education (com.abewy.android.apps.klyph.core.fql.User.Education)1 Relative (com.abewy.android.apps.klyph.core.fql.User.Relative)1 Work (com.abewy.android.apps.klyph.core.fql.User.Work)1 ParseException (java.text.ParseException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 Date (java.util.Date)1