Explorar el Código

Fix:加载地区更多群item闪动的问题

Junqin Wang hace 8 años
padre
commit
598937f9e8
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      app/src/com/sheishuo/app/main/adapter/AreaGroupsAdapter.java

+ 2 - 1
app/src/com/sheishuo/app/main/adapter/AreaGroupsAdapter.java

@@ -89,7 +89,8 @@ public class AreaGroupsAdapter extends RecyclerView.Adapter<AreaGroupsAdapter.Ar
 
     public void addGroup(String groupId){
         groupIds.add(groupId);
-        notifyDataSetChanged();
+        //保证数据直接插在所有数据下面
+        notifyItemChanged(groupIds.size());
     }
 
     @Override