How to pass an array list from one activity to another without starting it

前端 未结 4 1845
没有蜡笔的小新
没有蜡笔的小新 2021-01-06 18:31

I have an activity which has an array list

ArrayList array = new ArrayList(); 

i want this array list to be pa

4条回答
  •  太阳男子
    2021-01-06 19:02

    Based on the fact that you mention a 'Save' button, I think you would rather save this data to SharedPreferences or an SQLiteDatabase.

    I am unsure of what it would mean to 'save' some data to another Activity and not start it.

    With your data in a persisted state, you should be able to access it from any one of your other Activity's, which is what is sounds like you are after.

提交回复
热议问题