标签:ssim v2x lob bsh dha color icm fpm aof
Frescoj说明:
-------------------------------------------Fresco引入包及依赖项↓↓↓↓↓----------------------------------------------
检查添加mavenCentral();
-------------------------------------------Fresco引入包及依赖项↑↑↑↑↑----------------------------------------------
-------------------------------------------Fresco使用↓↓↓↓↓----------------------------------------------
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:fresco="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ly.blogtestbutterknife.MainActivity"> <com.facebook.drawee.view.SimpleDraweeView android:id="@+id/my_image_view" android:layout_width="130dp" android:layout_height="130dp" fresco:placeholderImage="@mipmap/ic_launcher" fresco:roundedCornerRadius="5dp" /> </LinearLayout>
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Fresco.initialize(this); setContentView(R.layout.activity_main); Uri uri=Uri.parse("http://b.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=6585d7a9820a19d8cb568c0106caaebd/faf2b2119313b07e63bade100ed7912397dd8ca7.jpg"); SimpleDraweeView draweeView= (SimpleDraweeView) findViewById(R.id.my_image_view); DraweeController mDraweeController = Fresco.newDraweeControllerBuilder() .setAutoPlayAnimations(true) //设置uri,加载本地的gif资源 .setUri(uri)//设置uri .build(); //设置Controller draweeView.setController(mDraweeController); }
-------------------------------------------Fresco使用↑↑↑↑↑----------------------------------------------
参考网站:https://www.fresco-cn.org/docs/getting-started.html
标签:ssim v2x lob bsh dha color icm fpm aof
原文地址:http://www.cnblogs.com/LOVEJIEYING/p/6043353.html