PageAdapter 的 notifyDataSetChanged 无作用解决方案
来源:互联网 发布:iapp 免杀源码 编辑:程序博客网 时间:2024/06/06 07:39
https://www.jianshu.com/p/6a0817520b08
重写下面的俩个方法
private class SetDialogAdapter extends PagerAdapter {
private int mChildCount = 0;@Override public void notifyDataSetChanged() { mChildCount = getCount(); super.notifyDataSetChanged();}@Override public int getItemPosition(Object object) { if (mChildCount > 0) { mChildCount--; return POSITION_NONE; } return super.getItemPosition(object);}
}
阅读全文