I have a recyclerview that load up to 30 itemviews and more In every itemview it has an Edittext to let the user enters some data And a save button. Inside the save button onclick
for (i in 0 until count){ //count = myRecycler.layoutmanager.itemcount
val view = myRecycler.layoutmanager!!..findViewByPosition(i)
val input: EditText = view!!.findViewById(R.id.input)
list.add(input.text.toString())
}
It goes for every itemview by position But because recyclerview just load the items that fits the screen it gives null pointer at the view val for the items that are out the screen Is there any solution to make this happen A solution i got Is to add A save button on every itemview so that when the user enters data he clicks the save button and so on. But that's not what I need