我有一个Activity,它会Fragment不时在各种不同的视图之间切换。在我的Activity代码中,假设我有
@Override
public void onStart() {
super.onStart();
... // The rest of your onStart() code.
EasyTracker.getInstance().activityStart(this); // Add this method.
}
@Override
public void onStop() {
super.onStop();
... // The rest of your onStop() code.
EasyTracker.getInstance().activityStop(this); // Add this method.
}
在每个Fragment代码中,我都需要吗?
EasyTracker.getInstance().setContext(this.getActivity());