Java Code Examples for com.facebook.drawee.view.SimpleDraweeView#setTag()

The following examples show how to use com.facebook.drawee.view.SimpleDraweeView#setTag() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProfileUtils.java    From imsdk-android with MIT License 6 votes vote down vote up
public static void setGroupPicture(final SimpleDraweeView mImageView, final int defaultPic, final Context context, final String jid) {
    FacebookImageUtil.loadFromResource(defaultPic, mImageView);
    if(TextUtils.isEmpty(jid))return;
    final String imageString = InternDatas.JidToUrl.get(jid);
    if(!TextUtils.isEmpty(imageString))
    {
        mImageView.setTag(null);
        FacebookImageUtil.loadWithCache(imageString,mImageView);
    }
    else {
        mImageView.setTag(jid);
        BackgroundExecutor.execute(new Runnable() {
            @Override
            public void run() {

            }
        });
    }
}
 
Example 2
Source File: ShareLocationActivity.java    From imsdk-android with MIT License 5 votes vote down vote up
private void addMember(String id) {
    if (!members.contains(id)) {
        //当前列表没有该用户
        members.add(id);
        hint.setText(String.format(HINT, members.size()));
        SimpleDraweeView view = createDraweeView();
        ProfileUtils.displayGravatarByUserId(id, view);
        view.setTag(id);
        topContainer.addView(view);
    }
}
 
Example 3
Source File: ProfileUtils.java    From imsdk-android with MIT License 5 votes vote down vote up
public static void displayGravatarByImageSrc(String jid,String imageSrc,final SimpleDraweeView headView){
        if (TextUtils.isEmpty(imageSrc)) {
            headView.setTag(jid);
            FacebookImageUtil.loadFromResource(CommonConfig.DEFAULT_GRAVATAR, headView);
//            loadVCard4mNet(jid, headView, null);
        } else {
            headView.setTag(jid);
            FacebookImageUtil.loadWithCache(imageSrc, headView, ImageRequest.CacheChoice.SMALL,
                    CurrentPreference.getInstance().isSupportGifGravantar());
        }
    }
 
Example 4
Source File: NetImageAdapter.java    From Fishing with GNU General Public License v3.0 5 votes vote down vote up
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    SimpleDraweeView draweeView = new SimpleDraweeView(getContext());
    draweeView.getHierarchy().setPlaceholderImage(new ColorDrawable(Color.rgb(252,242,230)));
    draweeView.getHierarchy().setFadeDuration(300);
    draweeView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
    draweeView.setImageURI(ImageModel.getInstance().getSmallImage(getItem(position)));
    draweeView.setTag(position);
    draweeView.setOnClickListener(this);
    return draweeView;
}