Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Intent.putExtra does not accept 2 dimension array as per the following document <a href="http://developer.android.com/reference/android/content/Intent.html" rel="nofollow">http://developer.android.com/reference/android/content/Intent.html</a></p> <p>I have check the source code of Intent.putExtra , It use Bundle Class to store data</p> <p><a href="http://developer.android.com/reference/android/os/Bundle.html" rel="nofollow">http://developer.android.com/reference/android/os/Bundle.html</a></p> <p>Here is Source code of Intent.java </p> <ol> <li>Intent.java <a href="http://gitorious.org/android-eeepc/base/blobs/fda6fae156e31a287e3cfbf66e51ea1405cdf479/core/java/android/content/Intent.java" rel="nofollow">http://gitorious.org/android-eeepc/base/blobs/fda6fae156e31a287e3cfbf66e51ea1405cdf479/core/java/android/content/Intent.java</a></li> <li>Bundle.java <a href="https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/Bundle.java" rel="nofollow">https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/Bundle.java</a></li> </ol> <p>Bundle.java use "HashMap" to store the content, </p> <p>Best of my knowledge it's not possible directly</p> <p>you can use putParcelable method, you need to create your own class instanceof 2 dimension array.</p> <p>one quick solution</p> <pre><code>String[] keys = createKeys(); String[] values = createValues(); (keys.length == values.length) bundle.putExtra("keys", keys); bundle.putExtra("values", values); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload