Only the Main thread, also known as the UI thread can update the UI a.f.a.i.k.
My suggestion is to do as much as you can on the background thread so the UI update is as minimal as possible. You will have to post the result back to the UI thread.
They aren’t used for asynchronous processing though. They are a way to deliver results to the intended source. Plus, EB is pretty much the LocalBroadcast in Android. The article is old, if anything, now I would add Rx to the list, though, as you said, it’s not pure Android, or part of support lib, or Google Play service.
I think I covered that in the article.
It’s not, needs at least 3 or 4 fragments. But, there is no reason you can’t include the same fragment twice, in a 1, 2, 1, 2 sequence and loop them then. If there is state that needs to remain constant between the #1 fragments, you can probably persist the data and update the fragment.
"M100,100 L300,100 L200,300 z"
Keep in mind that on computer screens 0,0 is the top left corner of the screen. So, when you draw a line from
300, 100 to
200, 300 the X coordinate is smaller, hence move left by 100px, & coordinate is larger so move down by 200px. Hope this clears it up.
The idea wasn’t really to provide a solution… the idea was just to talk about what the commands mean and why changing the values results in animation. If you want to animate on older versions of Android, there are plenty of libraries that can help you with that. I would check out Lottie by AirB&B or just use AnimatedGif’s on older versions of Android.
VectorGraphics should scale without issues, the standard size is 24 x 24dp which is the same as 24x24px. I suspect this is the case because that’s the recommended size for MDPI icons. Making Vectors too complex or too big can have significant performance issues, so keep them as simple as possible and as small as possible.
VectorDrawables are not supported natively very far back… especially with animations. You can generate PNG’s for your vectors for other platforms if you don’t need to animate them. I recall there being a config in build.gradle that would do this for you.