How to pass a String array value from one activity to another Activity in android?

前端 未结 6 1545
北荒
北荒 2020-12-15 14:20

I am having two activities in my application. I want to pass tha array of String from one activity to another.. How to pass this values from activity to activity?

6条回答
  •  一生所求
    2020-12-15 14:35

    Its very simple, make that variable static & make one public static method in that class like

    public static getArray() 
    { 
            return array; 
    } 
    

    Now access this method from another activity, where you want to access it.

提交回复
热议问题