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