在 Android 中,有一种非常标准的方法可以让您的系统类与它们的系统类交互:
@Override
public void onResume() {
super.onResume ();
//your code here
}
当您在 Eclipse 中键入“onr”然后控制空间时,存根会像这样填写,并在调用中使用 super 方法。您将如何表明您想从超类中执行此操作?
There are two cases for calling a function in a subclass from the superclass:
when implementing subclassing, you can override any public or protected method, the default behavior of a overridden method in Eclipse is to do what the parent class does, therefor the automatic code for any method that's overriden is to call the parent via super
.