Search code examples
androidarraylistparcelable

how to store android UI component in Parcelable class?


I am working on Parcelable class for storing data into arraylist and pass from one activity to other activity.but parcelable model class contain android component textview so, how can I read that component in parcelable class?

enter image description here

Your answer would be appreciated.


Solution

  • You don't. You cannot pass a View between processes, which is a requirement of Parcelable.

    Have CustBean hold a String, which contains the text that had been in the TextView in the first activity, so the second activity can create its own TextView to show that String to the user.