Frescoj Description:
Facebook's open-source picture-loading framework for Android apps is efficient and full-featured.
- Support Load network, local storage and resource picture;
- Provides level three cache (level two memory and first level internal storage);
- Support jpegs,pngs,gifs,webps, etc., also support progressive JPEG, excellent animation support;
- Picture fillet, scale, custom background, overlays, etc.;
- Excellent memory management;
- 2.3 (gingerbread) or above.
-------------------------------------------FResco introduces package and dependency ↓↓↓↓↓------------------------------------ ----------
Check add mavencentral ();
-------------------------------------------FResco introduces package and dependency ↑↑↑↑↑-------------------------------- --------------
-------------------------------------------FResco use ↓↓↓↓↓------------------------------------------ ----
<?XML version= "1.0" encoding= "Utf-8"?><LinearLayoutxmlns: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.SimpleDraweeViewAndroid:id= "@+id/my_image_view"Android:layout_width= "130DP"Android:layout_height= "130DP"Fresco:placeholderimage= "@mipmap/ic_launcher"Fresco:roundedcornerradius= "5DP" /></LinearLayout>
@Overrideprotected voidonCreate (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) //set the URI to load the local GIF resource. Seturi (URI)//set URI. Build (); //setting up a controllerDraweeview.setcontroller (Mdraweecontroller); }
-------------------------------------------F Resco using ↑↑↑↑↑----------------------------------------------
Reference website: https://www.fresco-cn.org/docs/getting-started.html
Fresco from configuration to use (most efficient picture loading framework)