传递意图安卓数组 [英] passing an array in intent android
问题描述
所以,我一直认为你不能活动之间有额外的数组传递的假设下。不过,我正要通过捆绑类的文档,看到 putStringArray(字符串键的String []值)
和公共字符串[] getStringArray(字符串键)
。那么,这些新?他们都表示,因为API拉特1,但我不记得能够传递数组。我是不是要疯了吗?
So I've always been under the assumption that you can't pass arrays between activities with extras. But I was just going through the Bundle class docs and saw putStringArray(String key, String[] value)
and public String[] getStringArray (String key)
. Are these new? They both say since API lvl 1, but I don't remember being able to pass arrays. Am I going crazy here?
推荐答案
我想你一定能够通过的String []作为Android的一个包。你有什么具体的理由进入这样的结论?
I think you must be able to pass string[] as a bundle in Android. Any specific reason you have for getting into such a conclusion?
请参考这个帖子
<一个href="http://www.anddev.org/view-layout-resource-problems-f27/how-can-i-pass-multidimensional-string-array-two-activities-t9259.html" rel="nofollow">http://www.anddev.org/view-layout-resource-problems-f27/how-can-i-pass-multidimensional-string-array-two-activities-t9259.html
这篇关于传递意图安卓数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!