Passing String array using intent
i am struck with passing String array from one activity to another using intent. while passing only a String from two activities, its work clear. but whenever i tried to acce开发者_Python百科ss string array i am getting force close error. can any one guide me to rectify the problem.
You can use just the Intent.setExtra(String, Serializable)
method. It accepts any Serializable
object. If that does not work, please attach results from your LogCat
, "Closed unexpectedly" just means your app failed, LogCat
tells why it failed.
use Parcelable
to do this.
please refer to this link http://shri.blog.kraya.co.uk/2010/04/26/android-parcel-data-to-pass-between-activities-using-parcelable-classes/
精彩评论