Android and android Official Website

Source: Internet
Author: User

Android and android Official Website
Dry Goods

Java. lang. unsupportedOperationException at android. view. GLES20Canvas. clipPath (GLES20Canvas. java: 287) at br.com. ba. view. pageCurlView. drawCurl (PageCurlView. java: 284) at br.com. ba. view. pageCurlView. onDraw (PageCurlView. java: 353) at android. view. view. draw (View. java: 9291)

After using the canvas clipPath method to draw an image, it is okay to run on Nexus5, but it cannot be switched to the Red Rice mobile phone, and the result is not displayed. Then I switched to a Huawei mobile phone to try it, crash directly. This is better than not crashing, but it does not show any effect. Then I searched StackOverFlow and found a solution.

The reason is that hardware acceleration is not supported.

Solution
MImageView. setLayerType (View. LAYER_TYPE_SOFTWARE, null );
I am the dividing line of tiantiao

 

 

Reference: http://stackoverflow.com/questions/7401319/use-hardwareacceleration-flag-with-canvas-clippath

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.