Fixed
Status Update
Comments
ku...@google.com <ku...@google.com>
ku...@google.com <ku...@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.
ms...@gmail.com <ms...@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
to...@gmail.com <to...@gmail.com> #4
[Comment deleted]
ms...@gmail.com <ms...@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.
to...@gmail.com <to...@gmail.com> #6
What about using requestAnimationFrame for loop rather than using a timer loop ?
ms...@gmail.com <ms...@gmail.com> #7
Hey, this is a serious issue that is affecting our production components, could someone please look into this???
ms...@gmail.com <ms...@gmail.com> #8
is there any solvtion for that issue ?
to...@gmail.com <to...@gmail.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.
il...@google.com <il...@google.com> #10
Opacity trick is better because will not initiate page reflow and hide /
show will.
show will.
to...@gmail.com <to...@gmail.com> #11
which trick would that be? modify the opacity?
il...@google.com <il...@google.com> #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);
}
il...@google.com <il...@google.com> #13
[Comment deleted]
to...@gmail.com <to...@gmail.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.
to...@gmail.com <to...@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!
il...@google.com <il...@google.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).
to...@gmail.com <to...@gmail.com> #17
seems android 4.1/4.2/4.3 both have this problem?
to...@gmail.com <to...@gmail.com> #18
Ok thanks for the detail.
Will this be released as a fast .X release or in the next normal scheduled cycle? (Just to have an idea if I should already start again using it to find other issues or have time for that).
Will this be released as a fast .X release or in the next normal scheduled cycle? (Just to have an idea if I should already start again using it to find other issues or have time for that).
il...@google.com <il...@google.com> #19
This has been fixed for the next release, almost certainly as part of a fast .X release
to...@gmail.com <to...@gmail.com> #20
So doing some more tests I see other differences in loaders behavior from before :(
Like onLoadFinished is being called when returning to fragment when it was not the case before (before any call to reload or init made)
And much more important a change in how onLoaderReset is now called.
The documentation of restartLoader Says: "If a loader with the same id has previously been started it will automatically be destroyed when the new loader completes its work. The callback will be delivered before the old loader is destroyed."
But new implementation does not that at all. It calls onLoaderReset then onCreateLoader then onLoadFinished. (Previous implementation was sometimes broken and never called onLoaderReset but at least there was no long duration where we have no data to display).
This is a major change because this means you can't keep the previous data during the load as it's invalidated but you have nothing to display since the new loader is not finished. Meaning empty screen on reload = quite bad UX.
Like onLoadFinished is being called when returning to fragment when it was not the case before (before any call to reload or init made)
And much more important a change in how onLoaderReset is now called.
The documentation of restartLoader Says: "If a loader with the same id has previously been started it will automatically be destroyed when the new loader completes its work. The callback will be delivered before the old loader is destroyed."
But new implementation does not that at all. It calls onLoaderReset then onCreateLoader then onLoadFinished. (Previous implementation was sometimes broken and never called onLoaderReset but at least there was no long duration where we have no data to display).
This is a major change because this means you can't keep the previous data during the load as it's invalidated but you have nothing to display since the new loader is not finished. Meaning empty screen on reload = quite bad UX.
ta...@gmail.com <ta...@gmail.com> #21
The onLoaderReset problem described in #20 makes working with CursorLoader and CursorAdapter suddenly very cumbersome in 27.1.0.
In order to avoid the "empty data" period of time after onLoaderReset, my extremely hacky workaround is to create a second identical loader, with a separate Loader ID, and flip between the two Loaders with each call to restartLoader, so that the previous Cursor remains alive until the next onLoadFinished callback.
In order to avoid the "empty data" period of time after onLoaderReset, my extremely hacky workaround is to create a second identical loader, with a separate Loader ID, and flip between the two Loaders with each call to restartLoader, so that the previous Cursor remains alive until the next onLoadFinished callback.
to...@gmail.com <to...@gmail.com> #22
ja...@gmail.com <ja...@gmail.com> #23
Before 27.1.0, loaders initialized with getSupportLoaderManager() used to receive a call to onStartLoading() while the activity was executing super.onStart(). This allowed synchronous loaders to initialize resources before the remaining body of onStart() executed. In 27.1.0, loaders no longer start loading until some time after onStart(). This change caused a few NPEs in our onStart() methods. Is this 27.1.0 behavior a violation of the "between onStart/onStop" contract?
I thinkhttps://issuetracker.google.com/issues/73976255#comment13 is referencing this same guarantee which appears to be broken.
I think
ja...@gmail.com <ja...@gmail.com> #24
With a bit more digging I found https://issuetracker.google.com/issues/74225064 which appears to reference and fix the exact issue that I mentioned in #23. Sorry for the noise.
sa...@gmail.com <sa...@gmail.com> #25
please update your support libraries with 27.1.1
kk...@google.com <kk...@google.com> #26
This bug has been fixed in Support Library 27.1.1.
sa...@gmail.com <sa...@gmail.com> #27
(Program type already present: android.arch.lifecycle.LiveData$LifecycleBoundObserver Message{kind=ERROR, text=Program type already present: android.arch.lifecycle.LiveData$LifecycleBoundObserver, sources=[Unknown source file], tool name=Optional.of(D8)})
solv this problam
solv this problam
Description
Since support library 27.1.0 when using a FragmentStatePagerAdapter in a viewPager the offscreen fragment lifecycle have changed.
Before onStart / onResume where called on those fragment and it's no more the case. The offscreen fragments have the lifecycle stopping at onActivityCreated.
After a screen rotation those lifecycle are called correctly. So it's more a bug on first creation of the fragments than a wanted API change it seems.
If it's a normal wanted API change please confirm.