I have a `RecyclerView` which has an `EditText` in its items.

For each `EditText` I have added a `textChangeListener`.

Whenever the user types a character I want to do an *input validation* and so I can change the item, for example show red border in case of wrong input etc...

After I do the validation I call:

```
adapter.notifyItemChanged(itemPosition) 

```

to update the view.

But the problem is that the focus is lost from the `EditText` and I have to click again inside the box in order to continue typing.

Is there a solution for this case? How can I continue typing while the view is updated after calling `notifyItemChanged` ?

[![enter image description here](https://i.stack.imgur.com/l0oIm.png)](https://i.stack.imgur.com/l0oIm.png)

**ADAPTER**

```
class ItemAdapter() : RecyclerView.Adapter<RecyclerView.ViewHolder>() {

  override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
     val inflater = LayoutInflater.from(parent.context)
     val binding = LayoutItemBinding.inflate(inflater, parent, false)
     binding.editText.addTextChangedListener {
        // Do layout changes....
        if (isInvalidInput) {
          item.setError = true
          ....
          ...
        }

        adapter.notifyItemChanged(itemPosition)
     }
     return ItemViewHolder(binding)
  }

  override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
      holder.bind(items[position])
  }

  inner class ItemViewHolder(val binding: LayoutItemBinding) 
  : RecyclerView.ViewHolder(binding.root) {

      fun bind(model: ItemModel) {
            // Setup view for item
        }
  }

}

```