Fresco framework from configuration to use (the most efficient image loading Framework)
Frescoj description:
Facebook's open-source image loading framework for android applications is efficient and fully functional.
------------------------------------------- Fresco introduces the package and its dependencies ----------------------------------------------
Check to add mavenCentral ();
------------------------------------------- Fresco introduces the package and its dependencies ----------------------------------------------
------------------------------------------- Fresco uses zookeeper to submit a certificate ----------------------------------------------
<?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) // sets the uri to load the local gif resource. setUri (uri) // set uri. build (); // Set Controller draweeView. setController (mDraweeController );}
------------------------------------------- Fresco uses zookeeper to submit a certificate ----------------------------------------------
Reference: https://www.fresco-cn.org/docs/getting-started.html