UI blocks when refreshing a listview (how to solve?)
问题 I have a button. On click, I am refreshing a list. What I am experiencing : The state_pressed color stays for a big while (meaning the UI thread blocked) (Note: the button background is defined such as on state_pressed="true" the color changes) Question : How can I click the button to refresh the list, without blocking the UI? My Code : mButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { refreshListView(data); } }); public void refreshListView(ArrayList data)