@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getActivity() instanceof ColorChange) { this.colorChange = (ColorChange) getActivity(); } cuurentColor = ColorTool.getColor(R.color.default_color, getActivity()); colorChange.onColorChange(cuurentColor, ColorTool.colorBurn(cuurentColor)); EventBus.getDefault().register(this); mFragmentManager = getChildFragmentManager(); }
@Override public void onDestroy() { super.onDestroy(); EventBus.getDefault().unregister(this); }
@Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); }