Amit Jayaswal
Amit Jayaswal

Reputation: 21

How to show gif image in ImageView in android?

I tried Picaso library, but it is not showing gif image. I am getting images with json. I tried following code :-

Picasso.with(mContext).load( stationWithState.station.getLogo()).transform(transformation).placeholder(R.drawable.ic_launcher).into(viewHolder.stationImageView[i]);

please help me ?

Upvotes: 1

Views: 595

Answers (2)

Jayesh Prajapati
Jayesh Prajapati

Reputation: 19

ImageView iv= (ImageView) findViewById(R.id.iv);

GlideApp.with(this).load("your_url").into(iv);

Use Glide

Upvotes: 0

Amit Jayaswal
Amit Jayaswal

Reputation: 21

Ok after doing google I found out a library which will help in showing gif image from json link

Ion.with(viewHolder.stationImageView[i])
                        .placeholder(R.drawable.ic_launcher)
                        .error(R.drawable.ic_launcher)
                        .fitCenter()
                        .load(stationWithState.station.getLogo());

Upvotes: 1

Related Questions