I'm trying to send MutableList<Point>
array list as Extra from Intent to another in kotlin.
Declaring the list:
private var thePoints: MutableList<Point> = mutableListOf()
and here is how I add items to it:
if (startStationPoint != null) {
thePoints.add(startStationPoint)
}
And am using this method to send it to the other Activity:
navigationActivity.putParcelableArrayListExtra(
"thePoints",
thePoints)
It gives me this error:
Type mismatch:
Required: ArrayList<out Parcelable>!
Found: MutableListM<Point>
as am using putParcelableArrayListExtra
as there is no such thing to put points arraylist extra.