Skip to main content

Posts

Featured

Loading ".gif" animation in android (a painless guide)

Today at eveing my friend asked me if I could manage to create a custom loading dialog with a gif in android. He told me to use a .gif file and not use sprites (frames in xml). I searched online and found out that ImageView doesn't show animation. I thought of using Hipmob/gifanimateddrawable but it was not what my friend wanted. So, I started from scratch and made my own view class. public class GIFView extends View { private Movie movie; //class that loads the animation private int gifID; //stores the id of the drawable gif file private long movieStart; //the time of start of movie private float x, y; //stores the x and y position of the view from the parent layout public int getGifID() { return gifID; } public void setGifID(int gifID) { this.gifID = gifID; } public GIFView(Context context) { super(context); } public GIFView(Context context, AttributeSet attrs) { super(context, attrs); //initialize the view and the abo...

Latest Posts

Dynamic Stack using struct in C

Star Wars in ASCII

Java Jokes

Frame creation

C++ Code to find prefix codes

Cracking and making keygen of a C# App

Subway Surfers with Keyboard Play, Script and torrent

Tic Tac Toe clone in Turbo C

Fruits in the basket Turbo C game

Hello world over the years