Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
The problem is very serious.
Currently html5 clearRect isn't working within any android 4 devices.
Please, solve this problem as soon as possible.
Currently html5 clearRect isn't working within any android 4 devices.
Please, solve this problem as soon as possible.
il...@google.com <il...@google.com>
lo...@gmail.com <lo...@gmail.com> #3
we have the same problem
We are waiting for a patch since November because none of the workaround we have tried is stable.
We hope that the patch will come before the launching of our app and if not...well, sadly, we will launch the app on iOS and windows only
We are waiting for a patch since November because none of the workaround we have tried is stable.
We hope that the patch will come before the launching of our app and if not...well, sadly, we will launch the app on iOS and windows only
ja...@gmail.com <ja...@gmail.com> #4
[Comment deleted]
b9...@gmail.com <b9...@gmail.com> #5
Still appears to be an issue as I'm getting quirky results when trying clearRect in a loop. #3 solution is good but too heavy to work in a loop.
ka...@gmail.com <ka...@gmail.com> #6
What about using requestAnimationFrame for loop rather than using a timer loop ?
b9...@gmail.com <b9...@gmail.com> #7
Hey, this is a serious issue that is affecting our production components, could someone please look into this???
yc...@gmail.com <yc...@gmail.com> #8
is there any solvtion for that issue ?
il...@google.com <il...@google.com> #9
Something like that works for me:
function bug_workaround() {
$(canvas).hide();
setTimeout(function() {
$(canvas).show();
}, 1);
}
I call this function after clear.
function bug_workaround() {
$(canvas).hide();
setTimeout(function() {
$(canvas).show();
}, 1);
}
I call this function after clear.
[Deleted User] <[Deleted User]> #10
Opacity trick is better because will not initiate page reflow and hide /
show will.
show will.
kk...@google.com <kk...@google.com> #11
which trick would that be? modify the opacity?
[Deleted User] <[Deleted User]> #12
Yes,
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
an...@gmail.com <an...@gmail.com> #13
[Comment deleted]
il...@google.com <il...@google.com> #14
Hi,
I'm having the same problem but the workaround doesn't seem to help. Was wondering if this issue is somehow fixed by now?
Thank You.
I'm having the same problem but the workaround doesn't seem to help. Was wondering if this issue is somehow fixed by now?
Thank You.
al...@gmail.com <al...@gmail.com> #15
This opacity hack works for me. I've had this issue on 4.1.1 and 4.1.2, both Galaxy S3 and the S3 mini.
Calling this function between clearing the canvas and the next draw call seems to have fixed the problem.
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
Thanks, dennis.ra!
Calling this function between clearing the canvas and the next draw call seems to have fixed the problem.
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
Thanks, dennis.ra!
al...@gmail.com <al...@gmail.com> #16
The opacity trick doesn't seem to work for me (Android 4.3).
Hide & show causes a lot of nasty flicker.
This solution works form me:
https://medium.com/@dhashvir/android-4-1-x-stock-browser-canvas-solution-ffcb939af758
But only the second one:
canvas.clearRect(0, 0, w, h);
canvas.style.display = 'none';// Detach from DOM
canvas.offsetHeight; // Force the detach
canvas.style.display = 'inherit'; // Reattach to DOM
Performance hit seems to be minimal for my app (game with multiple canvas one over another).
Hide & show causes a lot of nasty flicker.
This solution works form me:
But only the second one:
canvas.clearRect(0, 0, w, h);
canvas.style.display = 'none';// Detach from DOM
canvas.offsetHeight; // Force the detach
canvas.style.display = 'inherit'; // Reattach to DOM
Performance hit seems to be minimal for my app (game with multiple canvas one over another).
lb...@gmail.com <lb...@gmail.com> #17
seems android 4.1/4.2/4.3 both have this problem?
al...@gmail.com <al...@gmail.com> #18
3g...@gmail.com <3g...@gmail.com> #20
file sdcard encrypt....
[Deleted User] <[Deleted User]> #21
Common
Description
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation "android.arch.lifecycle:runtime:1.1.0"
implementation "android.arch.lifecycle:extensions:1.1.0"
implementation "android.arch.lifecycle:common-java8:1.1.0"
Version used: 27.1.0
Theme used: N/A
Devices/Android versions reproduced on: Emulator 24
- Relevant code to trigger the issue.
Make an Activity that contains a Fragment.
Make the Activity use a ViewModel, and make the Fragment also use a ViewModel.
Start the Activity and press back.
The Activity's ViewModel's onCleared method is called.
With AppCompat 27.0.2, the Fragment's ViewModel's onCleared method is called (as it should)
With AppCompat 27.1.0, the Fragment's ViewModel's onCleared method is not called (incorrect).
See the attached project that shows the issue.
With 27.0.2, the logs read:
---------------------------
org.jraf.android.viewmodelproblem.MainActivity: onCreate
org.jraf.android.viewmodelproblem.MainActivityViewModel: constructor
org.jraf.android.viewmodelproblem.MainFragment: onCreate
org.jraf.android.viewmodelproblem.MainFragmentViewModel: constructor
[back is pressed]
org.jraf.android.viewmodelproblem.MainActivity: onDestroy
org.jraf.android.viewmodelproblem.MainActivityViewModel: onCleared
org.jraf.android.viewmodelproblem.MainFragmentViewModel: onCleared
org.jraf.android.viewmodelproblem.MainFragment: onDestroy
With 27.1.0, the logs read:
---------------------------
org.jraf.android.viewmodelproblem.MainActivity: onCreate
org.jraf.android.viewmodelproblem.MainActivityViewModel: constructor
org.jraf.android.viewmodelproblem.MainFragment: onCreate
org.jraf.android.viewmodelproblem.MainFragmentViewModel: constructor
[back is pressed]
org.jraf.android.viewmodelproblem.MainActivity: onDestroy
org.jraf.android.viewmodelproblem.MainActivityViewModel: onCleared
org.jraf.android.viewmodelproblem.MainFragment: onDestroy
This seems to happen because of line 1645 of Fragment, this test:
if (mViewModelStore != null && !mHost.mFragmentManager.isStateSaved()) {
is always false because mHost.mFragmentManager.isStateSaved() is true.