关于cannot call this method while recyclerview is computing a layout or scrollin
2017-07-31 17:47
525 查看
不要在R ecycleview的bindviewholder里面设置的点击事件里面直接刷新数据
可以通过接口回调或者通知到外部去调用刷新
类似Evenbus完美解决
如果按照网上开ui线程去刷新,我觉得处理起来消耗的内存更多
性能方面没那么好
不知道对不对
可以通过接口回调或者通知到外部去调用刷新
类似Evenbus完美解决
如果按照网上开ui线程去刷新,我觉得处理起来消耗的内存更多
性能方面没那么好
不知道对不对
public void onEvent(ResumeEven e){ if (e.getP()!=e.getPosition()) rightAdapter.notifyDataSetChanged(); }
相关文章推荐
- Cannot call this method while RecyclerView is computing a layout or scrolling android.support.v7.wid
- RecyclerView , IllegalStateException: Cannot call this method while RecyclerView is computing a layo
- 使用RecyclerView中引发 java.lang.IllegalStateException: Cannot call this method while RecyclerView is com
- MOSS爬网问题Error from SharePoint site: Data is Null. This method or property cannot be called on Null values
- This ScrollView layout or its FrameLayout parent is useless; transfer the background attribute to th
- Android Error:main cannot be resolved or is not a field,异常语句:setContentView(R.layout.main);
- Waring:This LinearLayout layout or its FrameLayout parent is useless; transfer the background attribute to the other view
- Data is Null. This method or property cannot be called on Null values.错误分析
- Data is Null. This method or property cannot be called on Null values.
- 关于id cannot be resolved or is not a field 的一个解决方法
- Cannot set TextView width using setWidth or setLayoutParams
- 关于"HTTP method GET is not supported by this URL"的错误
- Cannot find ./catalina.sh The file is absent or does not have execute permission This file is nee
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- 关于VMware Tools installation cannot be started manually while Easy Install is in progress.
- layout cannot be resolved or is not a field
- Android WebView Error – Uncaught TypeError: Cannot call method...
- layout cannot be resolved or is not a field
- Android开发中Layout中明明改了id,但是还出现"cannot be resolved or is not a field"的原因
- R.id.layout等不能识别:cannot be resolved or is not a field