Doubt about android pattern to communicate with other activities

0

I have an ActivityMain, it starts at the beginning and only ends its activity at the end of the application, ie while browsing other activity of the app this activity will always be behind. My question is, in ActivityMain I can own one:

  

public static ArraiList < AnyAgit> list;

And at runtime when I'm browsing in any other activity of the app, can I work with the ActivityMain list by adding items, or populating ListView, or etc?

example:

  

ActivityMain.list.add (item)

This has already been tested and works. But the question is whether it is right to program this way? because if I were not going to do that, I would have to be passing the arrayList through intents, every time I call a new activity.

    
asked by anonymous 03.12.2014 / 15:04

0 answers