0

In my adapter I have a method to set information:

   public void setData(List<ListItem> dataList) {
        this.listItems = dataList;
        notifyDataSetChanged();
    }

But after I call this method, the data is refreshed and my View move up. I don't want this behavior, because if someone is changing something in the end of the page, the focus is lost.

There is any way to set data from an adapter and don't lose the focus?

rafaelasguerra
  • 2,354
  • 3
  • 18
  • 51

1 Answers1

0

You must call adapter.notifyDataSetChanged() from the UI thread. May be this & this SO posts can help you.

Community
  • 1
  • 1
Suhas
  • 1,356
  • 12
  • 18