HTML5 canvas issues on Android 4.1.1 [closed]
Asked Answered
I

0

13

Now that Android 4.1.1 is out there on some phones I noticed that issues start to pop out using default browser and this OS.

In my case I have an application that uses web views (meaning default browser) and a lot of canvas.

I want by having this topic that everyone to post found issues and solutions if you know one.

I will start with:

Problem: duplicated canvas More info at: http://code.google.com/p/android/issues/detail?id=35474 Solution Canvas parent element should not have css property "overflow" with value "hidden"

Problem Canvas drawing looks pixelated More info: You can read: http://www.html5rocks.com/en/tutorials/canvas/hidpi/ and also test //html5rocks.com/en/tutorials/canvas/hidpi/demo/demo.html to see yourself (in my case I don't use images I build using canvas and my drawing looks pixelated) also some info can be found at //code.google.com/p/android/issues/detail?id=38470 Solution (searching for one)

Problem Canvas drawn disappears More info: I couldn't found other people encountering this and in my case it reproduces sometimes. Solution (searching for one)

PS: I cannot post link because of anti-spam

Update (3 Sep 2013): duplicate canvas issue now appears on Nexus 7 having Android 4.2.2 and/or 4.3 Also you may want to know that "duplicate canvas" issue happens only if you have "Force GPU rendering" enabled for your device.

Incidental answered 25/10, 2012 at 15:3 Comment(9)
searching for solution to the same set of problem. Moderators, stop being so overzealous, its clear he is asking for a solution or any any hints leading to it!Loraleeloralie
Have a look at: code.google.com/p/android/issues/detail?id=35474Quinby
Updated initial content. Now duplicate canvas issue appears in Android 4.2.2 and 4.3 on Nexus 7 device.Incidental
@GregBala Agreed. I am here for the same reason and this question is interesting. also for duplicated canvas I found I needed to set the position property to absolute both for the canvas and the parent containerTarpan
I posted a fix (bandaid) to this problem here: #18272490Rhodarhodamine
There is still no solution for this problem. we basically abandoned the canvas for animation and use divs for sprite animationLoraleeloralie
There is a solution - triggering a redraw, or absolutely positioning the elements - both of those solve the issue. I won't say that redraw will work in all cases but I used positioning and it works fine (HTC 4.1 and HTC 4.2 as test devices - not positioning solves this jsut visually).Tilla
Voting to reopen since tihs problem is still very actual for all android developers still having to support Android native browser on 4.1/4.2/4.3 systems.Tilla
@Tilla the problem may be actual still, but this is not even a question, it's a collection of problems and solution(s)Standoffish

© 2022 - 2024 — McMap. All rights reserved.