开源控件GifView

来源:互联网 发布:基于云计算的oracle 编辑:程序博客网 时间:2024/05/28 23:22

一个只需要导入jar包就可以使用的开源控件,用法和ImageView类似

jar包下载地址 :http://pan.baidu.com/s/1i3GEj7R


效果

这里写图片描述

XML

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    >   <com.ant.liao.GifView       android:layout_width="match_parent"       android:layout_height="match_parent"       android:id="@+id/gifview"       ></com.ant.liao.GifView></RelativeLayout>

Activity

...        GifView mGifView = (GifView) findViewById(R.id.gifview);        mGifView.setGifImage(R.drawable.f);        //  设置显示的大小,拉伸或者压缩 长度单位:px        mGifView.setShowDimension(600, 600);...

转载于:http://www.qiushurong.cn/2014/07/11/gifview/

0 0