@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); new GetEventsTask().execute(); SharedPreferences sharedPreferences = getActivity().getSharedPreferences(GlobalValues.PREFS_FILE_NAME, 0); float compileWeight = sharedPreferences.getFloat(GlobalValues.PREFS_COMPILE_WEIGHT, 1.0f); binder.hostToggle.setOnCheckedChangeListener(this); binder.serverSettingsSave.setOnClickListener(this); binder.serverSettingsRestoreDefaults.setOnClickListener(this); binder.excel.setOnClickListener(this); binder.viewEvent.setOnClickListener(this); binder.setCompileWeight(compileWeight); EventBus.getDefault().post(new ServerStateRequestEvent()); }
@Override public void onDestroy() { EventBus.getDefault().unregister(this); super.onDestroy(); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); EventBus.getDefault().register(this); }