开发者

How to store String[] in android?

开发者 https://www.devze.com 2023-03-03 08:36 出处:网络
I want to store an array of strings internal in android but I want to do that in a separate class, not inactivity. How can I do that? And then retrieve it?

I want to store an array of strings internal in android but I want to do that in a separate class, not inactivity. How can I do that? And then retrieve it?

thanks

how I want to work whit it.I have 2 methods addFoo(String s){} and String[] GetAllFoo(){} In开发者_如何学编程activity I need to add some strings and get the whole array


Looks like this thread explains how you should solve your problem Android Sharepreferences and array


Declare an inheritance class entends Application, and then registered in Mainifest.xml. In the inheritance class define your array.

0

精彩评论

暂无评论...
验证码 换一张
取 消