我有一份简单的清单,由我的ArrayAdapter支持,每秒5秒左右更新一次,有新的数据。 每5秒,Im援引通知DataSetChanged在我的ArrayAdapter上,结果名单中重新引用新数据。 所有这一切都奏效,每5秒看到新数据。
然而,在我的ArrayAdapter的收听方法中,Im 冲锋相对,包括EditText。 在这里,我试图解决问题:
- User has selected the EditText in one of the rows and types in some input.
- User stays focused on the EditText for more than 5 seconds.
- notifyDataSetChanged gets invoked as new data has arrived in my array adapter.
- User loses focus on the EditText as it has been redrawn. notifyDataSetChanged seems to result in all ListView elements getting redrawn.
允许用户继续关注EditText但确保数据总是新鲜的最佳途径是什么?
Thanks,
海 地