Fresco from configuration to use (most efficient picture loading framework)

Source: Internet
Author: User

Frescoj Description:

Facebook's open-source picture-loading framework for Android apps is efficient and full-featured.
    1. Support Load network, local storage and resource picture;
    2. Provides level three cache (level two memory and first level internal storage);
    3. Support jpegs,pngs,gifs,webps, etc., also support progressive JPEG, excellent animation support;
    4. Picture fillet, scale, custom background, overlays, etc.;
    5. Excellent memory management;
    6. 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.