I have a mutableList
.
var newList: MutableList<String> = mutableListOf()
How to pass newList
through intent?
I tried this but not working.
mIntent.putParcelableArrayListExtra("mFilePath", ArrayList(newList))
Error
Type inference failed. Expected type mismatch: required: java.util.ArrayList! found: kotlin.collections.ArrayList /* = java.util.ArrayList */
Was able to fix it.
mIntent.putStringArrayListExtra("mFilePath", ArrayList(newList))