1

I tried to remove and request focus when only if I dont typing text - all don't work. How can I fix that?

TextInputLayout and TextInputEditText inserted in recyclerview

enter image description here

Ruslan
  • 1,039
  • 1
  • 9
  • 16
Arsen Tagaev
  • 411
  • 7
  • 13

1 Answers1

1

I would suggest for example to do something like this:

...
// at the top of the class
boolean canScrowVertically = true;
...
...
// init recycler
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
... 
...
// Init linerLayout and override canScrollVertically method
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context) {
    @Override
    public boolean canScrollVertically() {
        return canScrowVertically;
    }
};
...
...
// Set the manager
recyclerView.setLayoutManager(layoutManager)
...

Then you can manipulate canScrowVertically to disable/enable the scrow.

Top4o
  • 547
  • 6
  • 19