Professional Documents
Culture Documents
Abhinava's Blog - Animated GIF ImageView Library For Android PDF
Abhinava's Blog - Animated GIF ImageView Library For Android PDF
Abhinava's Blog - Animated GIF ImageView Library For Android PDF
The Sample application demonstrate that the Library Can handle both regular Image
(PNG/JPG) and Animated GIF on same View. Therefore giving developer the flexibility to
use Image/GIF without making any changes to his/her code base.
Sample Implementation:
layout.xml
android:id="@+id/animatedGifImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_above="@+id/button1"
android:layout_below="@+id/textView1" />
Activity.java
animatedGifImageView =
((AnimatedGifImageView)findViewById(R.id.animatedGifImageView));
animatedGifImageView.setAnimatedGif(R.raw.animated_gif,
TYPE.FIT_CENTER);
That's It!
AnimagedGifImageView supports some basic parameters to give you better control of
image resizing (If required) There fore you can pass :
FIT_CENTER: Stretch and fit image while maintaining aspect ratio
STREACH_TO_FIT: Stretch Image irrespective of aspect ratio
AS_IS: Place the image without any manipulations.
Hope you will use the library and make your life easier :)
Unknown at 1:09 PM
Share
16 comments:
sourabh jain June 19, 2014 at 4:47 PM
It works fine. Thanks for your help. Can you please tell me How can I set height and width of
GIFImageView..
Reply
Comment as:
Publish
Sign out
Notify me
Preview
Home
Jann
Abhi
Unknown
Powered by Blogger.