-
Notifications
You must be signed in to change notification settings - Fork 591
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
关于onRefresh方法重写的问题 #55
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
``public interface INewsArticle {
在这个接口中有一个onRefresh方法,但是在这个接口的实现类NewsArticleView中,并没有实现onRefresh方法。但是也没有编译报错。
之后我发现是在BaseListFragment类中,有一个SwipeRefreshLayout.OnRefreshListener监听的onRefresh方法写在里面。
这里有点疑惑?两个方法名虽然一样,但是是两个不同接口里面的方法。为什么不会编译报错?
然后我把SwipeRefreshLayout.OnRefreshListener写成匿名内部类的方式,NewsArticleView类就因为没有实现INewsArticle.View中的onRefresh方法而报错。
大神,求解答,谢谢
The text was updated successfully, but these errors were encountered: