Ad
How To Add Multiple GIFs To Android GridView
How to add multiple GIFs to Android GridView? Let's assume that we have a 4*4 grid (16 cells), with a different individual animated GIF image being shown in each cell in such a way that each image is animating on its own. Therefore creating a GIF of 16 different videos/animations, all playing at the same time in 16 separate cells.
Ad
Answer
First Step
In you GridAdapter make a function
public void upadteList(List<yourGifList> list){
this.gifList = list;
notifyDataSetChanged();
}
then in OnBind Method
callGlide.with(context).asGif().load(gifList).into(imageView);
Second
In your activity call upadteList() methodgridAdapter.updateList(imagesList);
Note : i am assuming you are already have a recyclerView setup.
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad