Telephone: Canvas does not refresh properly.

I am making an Android application in Phonegap. In the canvas, I made a moving image by touching it. I tested different versions on the device

when I run 4.1, 4.2 or 4.3, the image is duplicated while moving. All other version is ok

I try to apply the background color of the background and the opacity, but still duplicate

is there any solution for this

Thank you in advance

+6
source share
2 answers

i check application 4.0,4.1,4.2,4.3 and 4.4

only this problem in jelly bean

var canvas = document.getElementById('canvas'); canvas.style.opacity = 0.99; setTimeout(function() { canvas.style.opacity = 1; }, .01); 

This code works great for me

+1
source

I am not sure if this is really the cause of RAM memory. You are trying to use it on another device, so there may be a different result.

My advice is to implement the clearing function and call it after the move. But it is very difficult to say something important if you did not specify any working code or sample.

0
source

Source: https://habr.com/ru/post/989128/


All Articles