SVGImageView Flicker
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
What steps will reproduce the problem?
Any use of the SVGImageView included in XML.
What is the expected output? What do you see instead?
Expect image to be loaded. There's a slight delay and it pops in.
What version of the product are you using? On what operating system?
1.2.2-beta-1 Nexus 4 running 4.4.4
Please provide any additional information below.
In this version there's a delay between when the view is shown and when the
image actually appears. It occurs whether the image resource is set in XML or
set in code via .setImageResource(). I'm using R.raw.someicon resources. I just
switched to using 1.2.1 and it doesn't have this problem. Just wanted to make
sure it was a known issue.
Original issue reported on code.google.com by shawnma...@gmail.com
on 15 Aug 2014 at 2:12
Google Code Exporter commented
Hi Shawn, thanks for the report.
This is due to a change in SVGImageView in 1.2.2. The SVGs are now loaded and
parsed asynchronously. Previously the load/parse was done on the UI thread,
which has the effect of slowing done the view layout, and is actively
discouraged by Google/Android. SVGImageView is now doing things the right way.
Apart from it perhaps being an unexpected change for you, is it actually
causing any problems? We are doing things in the recommended way now, so this
behaviour will probably not be changing.
If you need different behaviour, you have the option of loading all the SVGs
yourself and calling setSVG() on each view once they are all loaded.
Original comment by paul.leb...@gmail.com
on 15 Aug 2014 at 8:15
Google Code Exporter commented
I figured it was because of the asynchronous change. Other than the aesthetic
difference it doesn't have any actual problems. So I guess I'll just leave it
or manually handle the SVGs to prevent the delay.
Original comment by shawnma...@gmail.com
on 15 Aug 2014 at 8:42
Google Code Exporter commented
Original comment by paul.leb...@gmail.com
on 15 Aug 2014 at 8:46
- Changed state: Invalid