小编Ezr*_*rou的帖子

在自定义列表视图上调用 notifyDatasetChanged() 后继续关注 TextView?

我有一个ListView适配器,当我修改我的TextView,我呼吁notifyDataSetChanged()addTextChangeListener()方法。但是我的 TextView 失去了焦点。我如何保持焦点,覆盖notifyDataSetChanged()?

我这样做但没有用

@Override
public void notifyDataSetChanged(){
    TextView txtCurrentFocus = (TextView) getCurrentFocus();
    super.notifyDataSetChanged();
    txtCurrentFocus.requestFocus();
}
Run Code Online (Sandbox Code Playgroud)

android listview android-arrayadapter notifydatasetchanged

6
推荐指数
1
解决办法
2109
查看次数