@Override
 public void onPause() {
   super.onPause();
   if (mEnabledSwitch != null) {
     mEnabledSwitch.pause();
   }
 }
 @Override
 public void onDestroyView() {
   super.onDestroyView();
   if (mEnabledSwitch != null) {
     mEnabledSwitch.teardownSwitchBar();
   }
 }
  @Override
  public void onResume() {
    super.onResume();

    final TinkerActivity activity = (TinkerActivity) getActivity();
    if (mEnabledSwitch != null) {
      mEnabledSwitch.resume(activity);
    }
  }