Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在使用的过程中会报错:An instance of OnFlingListener already set“” #6

Closed
WUSIR-ShiYan opened this issue Sep 26, 2017 · 4 comments

Comments

@WUSIR-ShiYan
Copy link

loadService = LoadSir.getDefault().register(this, new Callback.OnReloadListener() {
@OverRide
public void onReload(View v) {
// Your can change the status out of Main thread.
new Thread(new Runnable() {
@OverRide
public void run() {
loadService.showCallback(LoadingCallback.class);
//do retry logic...
SystemClock.sleep(500);

                    //增加这一段即可
                    if(recyclerView.getOnFlingListener() != null){
                        recyclerView.setOnFlingListener(null);
                    }

                    //callback
                    loadService.showSuccess();
                }
            }).start();
        }
    });
    PostUtil.postCallbackDelayed(loadService,EmptyCallback.class);
@KingJA
Copy link
Owner

KingJA commented Sep 26, 2017

@WUSIR-ShiYan 你好,我的实例代码中没有使用到RecyclerView,你在使用SnapHelper吗,能否给出完整的代码,我好判断是LoadSir的原因还是其它原因。

@WUSIR-ShiYan
Copy link
Author

WUSIR-ShiYan commented Sep 26, 2017 via email

@KingJA
Copy link
Owner

KingJA commented Sep 26, 2017

@WUSIR-ShiYan 可以直接把Demo压缩包发我邮箱吗

@WUSIR-ShiYan
Copy link
Author

WUSIR-ShiYan commented Sep 26, 2017 via email

@KingJA KingJA closed this as completed Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants