I can't populate image view using Glide in Firebase recycler view

382
February 02, 2017, at 03:23 AM

I am trying to populate my Firebase's recycler view with image url. But its not working. Few images are changing on their own. Few aren't displaying. I don't know. May be the image link is not right. Image link are like following: github.com/GDGVIT/gdgvit.github.io/blob/new-website/members/Shiv.jpg?raw=true, https://scontent.fdel1-2.fna.fbcdn.net/v/t1.0-9/941872_1155868307766654_5025113179683551097_n.jpg?oh=f83c14f2bc3036ca9be144a08c35b58c&oe=58F02E42, http://drive.google.com/uc?export=view&id=0BzezVIpuqaxqS3ZzNW56bDJTN0E

Do the size of image in the url matter?

public void onStart()
{
    super.onStart();
    View view=getView();
    mRef=new Firebase("https://gdg-vit-vellore-af543.firebaseio.com/managementmembers");
    mRecyclerView = (RecyclerView)view.findViewById(R.id.recycler_view_management_member);
    mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    custom_font = Typeface.createFromAsset(getActivity().getAssets(),"fonts/Montserrat-Regular.ttf");
    FirebaseRecyclerAdapter<MemberModel,ManagementMemberFragment.MembersViewHolder> adapter=new FirebaseRecyclerAdapter<MemberModel,ManagementMemberFragment.MembersViewHolder>(
            MemberModel.class,
            R.layout.card_member,
            ManagementMemberFragment.MembersViewHolder.class,
            mRef.getRef()
    ) {
        @Override
        protected void populateViewHolder(ManagementMemberFragment.MembersViewHolder membersViewHolder, MemberModel memberModel, int i) {
            membersViewHolder.name.setTypeface(custom_font);
            membersViewHolder.work.setTypeface(custom_font);
            membersViewHolder.githubid.setTypeface(custom_font);
            membersViewHolder.profile_pic.setImageDrawable(null);
            membersViewHolder.name.setText(memberModel.getName());
            membersViewHolder.work.setText(memberModel.getWork());
            membersViewHolder.githubid.setText(memberModel.getGithubid());
            Log.v("From"+"management fragment",memberModel.getProfile_pic());
            Glide.with(getActivity()).load(memberModel.getProfile_pic()).thumbnail(0.4f).error(R.drawable.image_not_found).into(ManagementMemberFragment.MembersViewHolder.profile_pic);
        }
    };
    mRecyclerView.setAdapter(adapter);
}
public static class MembersViewHolder extends RecyclerView.ViewHolder{
    TextView name,work,githubid;
    static CircleImageView profile_pic;
    public MembersViewHolder(View v) {
        super(v);
        name=(TextView)v.findViewById(R.id.member_name);
        work=(TextView)v.findViewById(R.id.member_work);
        githubid=(TextView)v.findViewById(R.id.member_github_id);
        profile_pic=(CircleImageView)v.findViewById(R.id.member_image);
    }
}

Please help!!!

Rent Charter Buses Company
READ ALSO
How to send Android Google Maps JSON location to RESTful web service

How to send Android Google Maps JSON location to RESTful web service

I have an android application which simply takes google maps locations from users with markers then I would like to send those locations to the web service which again use on google maps on web

458
ErrorDialogManager in EventBus GreenRobot

ErrorDialogManager in EventBus GreenRobot

http://greenrobotorg/files/eventbus/javadoc/3

338
LibGDX AssetManager not loading anything

LibGDX AssetManager not loading anything

I have recently added an AssetManager class to my LibGDX game, but I can't seem to get it to work

537
What is the best way of declaring and implementing two java classes?

What is the best way of declaring and implementing two java classes?

I have two classes one is called Modifiers and the other is called OptionsModifiers has an id, name and a group of options associated with it

286