大家讲道理2017-04-17 17:44:39
What’s the scene like? Does this picture already have a corresponding bitmap object in the first activity?
PHP中文网2017-04-17 17:44:39
No matter what the scenario is, try not to pass objects, especially bitmap objects that may be large and expensive. Pass a URL to load. It should be cached anyway
ringa_lee2017-04-17 17:44:39
Use DiskLruCache, MemoryLruCache secondary cache, just pass the URL, but the overhead of passing the object is too high
怪我咯2017-04-17 17:44:39
Thank you for the invitation. What was said above is very clear. If there is a URL, the preferred URL is preferred. If not, caching can be considered. It is best not to pass Bitmap in the form of Intent. Large images may not be passed, and TransactionTooLargeException will appear
迷茫2017-04-17 17:44:39
If it is a picture obtained locally or from the Internet, of course it is best to pass the URI URL or something.
If it is a drawn picture, I originally used a class to manage it and use static variables to access it, so that it can be used globally. There is no need to pass it around, just empty it after use.