Android Studio Tutorials, Admob Banner Ads, Recycler View, Imageview, Gif Imageview, How to Implement Admob Ads, Android Studio Errors, Firebase Database, Get Text from Firebase, Video Status Android Studio

test

Breaking

Post Top Ad

Your Ad Spot

Friday 24 April 2020

How to implement Gif ImageView in Android Studio | Implementation of Gif Image

Hello friends welcome to Codings Hub Andro, In this Topic we learn the implementation of Gif Image in Android Studio step by step, So if you want more tutorials of Android Studio then do follow out blog so that you can get more Android Studio Tutorials from this blog.

First of all we have to add a dependency in our Android Studio project so that we can play Gif Image in our Android App, So just add this dependency to build.gradle file in dependencies.
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
After that just sync the project so that your android studio project will add all gif imageview files, So after syncing completing it you are ready to play gif image in Android app. So before starting anything we have to just thing about its logic that how its work, just thing for creating a image we need to add Imageview in xml layout file, just same as we need to add a GifImageview in that xml layout file where we need to play gif. so just follow this code and implement this in your app.

pl.droidsonroids.gif.GifImageView android:layout_width="match_parent" android:scaleType="fitXY" android:id="@+id/forhim" android:src="@drawable/gltob" android:layout_height="match_parent"
So just paste this code in your layout where you want to add gif imageview, after that just paste your gif image file in drawable folder and replace your image after that you are ready to play your gif image in your Android app. So just test your app now.

No comments:

Post a Comment

Post Top Ad

Your Ad Spot