Search in sources :

Example 1 with FriendPickerHolder

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

the class FriendPickerAdapter method mergeViewWithData.

@Override
protected void mergeViewWithData(View view, GraphObject data) {
    super.mergeViewWithData(view, data);
    setData(view, data);
    FriendPickerHolder holder = (FriendPickerHolder) getHolder(view);
    //holder.getFriendPicture().setImageDrawable(null);
    Friend friend = (Friend) data;
    holder.getFriendName().setText(friend.getName());
    //holder.getCheckbox().setSelected(user.isSelected());
    ((Checkable) view).setChecked(friend.isSelected());
    if (placeHolder == -1)
        placeHolder = AttrUtil.getResourceId(getContext(holder.getFriendPicture()), R.attr.squarePlaceHolderIcon);
    loadImage(holder.getFriendPicture(), friend.getPic(), placeHolder, data);
}
Also used : Friend(com.abewy.android.apps.klyph.core.fql.Friend) FriendPickerHolder(com.abewy.android.apps.klyph.adapter.holder.FriendPickerHolder) Checkable(android.widget.Checkable)

Example 2 with FriendPickerHolder

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

the class FriendPickerAdapter method attachHolder.

@Override
protected void attachHolder(View view) {
    ImageView friendPicture = (ImageView) view.findViewById(R.id.friend_profile_picture);
    TextView friendName = (TextView) view.findViewById(R.id.friend_name);
    CheckBox checkBox = (CheckBox) view.findViewById(android.R.id.checkbox);
    setHolder(view, new FriendPickerHolder(friendPicture, friendName, checkBox));
}
Also used : CheckBox(android.widget.CheckBox) TextView(android.widget.TextView) ImageView(android.widget.ImageView) FriendPickerHolder(com.abewy.android.apps.klyph.adapter.holder.FriendPickerHolder)

Aggregations

FriendPickerHolder (com.abewy.android.apps.klyph.adapter.holder.FriendPickerHolder)2 CheckBox (android.widget.CheckBox)1 Checkable (android.widget.Checkable)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 Friend (com.abewy.android.apps.klyph.core.fql.Friend)1