开发者

Trouble overriding a method in Gallery view in Android

OKay gang, forgive me if this开发者_开发知识库 question is ubernoobness, but i am having trouble overriding a couple of methods of the Gallery class in my CustomGallery class, which is extended from Gallery. can someone tell me why this is okay to override:

@Override
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
 {
  return super.onFling(e1, e2, 0, velocityY);
 }

but this one creates an error - "The method onFinishedMovement() of type CustomGallery must override a superclass method":

@Override
 private void onFinishedMovement()
 {
        //
    }

As far as I can tell they are all members of the same class, but clearly I am missing something. Thanks for any help understanding this!


onFinishedMovement() is private method of Gallery so it's not accessible outside the class in which it is defined ( including inherited classes)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜