Zalacha is like this: there are 2 activations, with common constructions, and different textview

ArrayList<HashMap<String, String>> myArrList = new ArrayList<HashMap<String, String>>(); HashMap<String, String> map; SimpleAdapter adapter = new SimpleAdapter(this, myArrList, R.layout.row) 

Each sends its intent from the textview to the general list. How to realize that these two intentions from different activations are added as you add, and there are 2 list items, even after you close the activit with the list, or go to another (when you click "back")? Like shopping carts in stores.

  • 3
    The best solution would be to use a database, but for a primitive (learning) task, you can limit yourself to SharedPreferences. You create a table in the database and add records from each activity. When required, list these entries. Intents and collections are superfluous. - pavlofff
  • Thank you, the issue is resolved. - Romik romikromik

0