Has an interface with some functions. The base class implements the interface. Then in the subclass would like to override the function.
But the @override gives complier error "method does not override method from its superclass"
Question: in sub class, how to override the interface function implemented in base class?
public interface TheCallback {
void onImageUrlReady(final ImageView view, final ImageRecord imageData);
}
public class ImageFragment extends Fragment implements TheCallback {
@Override
void onImageUrlReady(final ImageView view, final ImageRecord imageData) {
//base class implementation
}
}
public class DerivedFragment extends ImageFragment {
@Override //<=== got compile error here
void onImageUrlReady(final ImageView view, final ImageRecord imageData) {
//sub class override implementation
}
}