pashapm / androidsvg

Automatically exported from code.google.com/p/androidsvg
0 stars 0 forks source link

SVGImageView Flicker #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

Original comment by paul.leb...@gmail.com on 15 Aug 2014 at 8:46