I have read about global static technique in which we create a class with static fields which can be accessed in any activity. Is there any other way to pass large data sets like ArrayList<Drawables> or HashMaps ?
I have also read about Serializable but have no idea how to use it. Any example code is welcome…
I have read about global static technique in which we create a class with
Share
If your ArrayList contains another Object that you have created yourself, for instance Friend.class, you can implement the Friend.class with Serializable and then:
And for receiving it on NextActivity.class:
Well, instead of passing an empty ArrayList, you’ll have to put values into the ArrayList and then pass it, but you get the idea.