开发者

How to store String[] in android?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜