March 1, 2016 Android notes

Source: Internet
Author: User

1: After checking the data, there are two kinds of GIF animations loaded in Android

1) Use Webview,webview to invoke the main three methods: Loadurl, LoadData, Loaddatawithbaseurl

2) The main use is: Android Android.graphics.Movie this class, which is provided by Android to us a very convenient tool. Some notes such as API one Android 3.0 honeycomb (APILevel 11) cannot be used after hardware rendering.

/*** starting from Honeycomb has to turn off HW acceleration to draw* Movie on Canvas.    *    /if (Build.VERSION.SDK_INT >= build.version_codes. Honeycomb) {        setlayertype (view.layer_type_software, null);    }

You need to turn off hardware rendering for the view component. Refer to the following:

public class Fragmentcomment extends Fragment {private View rootview; @Overridepublic View Oncreateview (layoutinflater Inflater, ViewGroup container,bundle savedinstancestate) {//TODO auto-generated Method Stubrootview = Inflater.inflate ( R.layout.case_history_comment, NULL); Rootview.setlayertype (view.layer_type_software, null); return rootview;}}

  

  

Reference: HTTP://MY.OSCHINA.NET/U/143926/BLOG/173011?FROMERR=4FLMA5Q5

Finally see the summary of http://weavora.com/blog/2012/02/07/android-and-how-to-use-animated-gifs/this article.

March 1, 2016 Android notes

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.