sp_layout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { adapter.cleanData(); } });
主界面上可能会有2个不同的请求,但是他们失败以后都要调用这个onrefreshlistener。怎样才能区分是哪个请求,从而执行相应的代码?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Isn’t it enough to set different identifiers for different requests? ?
Do you need to add a listener refresh according to your needs? Just call the corresponding method directly on a failure.
Isn’t it enough to set different identifiers for different requests? ?
Do you need to add a listener refresh according to your needs? Just call the corresponding method directly on a failure.