parcelable encountered ioexception writing serializable object…?

前端 未结 5 661
旧时难觅i
旧时难觅i 2021-01-19 01:43

The code

SngList.setOnItemClickListener(new OnItemClickListener() {
    public void onItemClick(AdapterView a, View v, int position, long id) {


        In         


        
5条回答
  •  不知归路
    2021-01-19 02:39

    To get the arraylist from another activity.

          ArrayList list = new ArrayList();
                  list=  getIntent().getStringArrayListExtra("Data1");
    

    To pass the arraylist to another activity.

    intent.putStringArrayListExtra("Data1", Songinfo);
    

    To split the array list:

            for(SongDetails name: list)
            {
            String yoursong= name.song;
            }
    

    Hope this will give you some solution.

提交回复
热议问题