protected void initActionbar(int homeResId, String title, int backgroundRes) {
   if (mBaseFragmentLayout == null || mToolbar == null) {
     return;
   }
   if (mActionbarTitle == null) {
     ActionBarActivity activity = (ActionBarActivity) getActivity();
     if (mToolbar == null) {
       mToolbar = mBaseFragmentLayout.getToolbar();
     }
     mActionbarTitle =
         new ActionbarTitle(
             activity,
             mToolbar,
             ScreenControl.getInstance(),
             homeResId,
             title,
             backgroundRes,
             mHomeListener);
   } else {
     if (title.equals(mActionbarTitle.getTitle())) {
       return;
     }
     mActionbarTitle.init(homeResId, title, backgroundRes);
   }
 }
 protected void initBaseValue(BaseFragmentLayout layout) {
   mBaseFragmentLayout = layout;
   mToolbar = layout.getToolbar();
   if (mReceiver == null) {
     registerBroadcast();
   }
   if (mContext == null) {
     mContext = getActivity();
   }
   if (mResouce == null) {
     mResouce = mContext.getResources();
   }
   if (mScreenControl == null) {
     mScreenControl = ScreenControl.getInstance();
   }
   if (mPopup == null) {
     mPopup = new Popup(getActivity());
   }
   if (mToastPopup == null) {
     mToastPopup = new ToastPopup(getActivity());
   }
   if (mUserDataProvider == null) {
     mUserDataProvider = UserDataProvider.getInstance(getActivity());
   }
   if (mDeviceDataProvider == null) {
     mDeviceDataProvider = DeviceDataProvider.getInstance(getActivity());
   }
   if (mDoorDataProvider == null) {
     mDoorDataProvider = DoorDataProvider.getInstance(getActivity());
   }
   if (mEventDataProvider == null) {
     mEventDataProvider = EventDataProvider.getInstance(getActivity());
   }
   if (mAccessGroupDataProvider == null) {
     mAccessGroupDataProvider = AccessGroupDataProvider.getInstance(getActivity());
   }
   if (mAccessLevelDataProvider == null) {
     mAccessLevelDataProvider = AccessLevelDataProvider.getInstance(getActivity());
   }
   if (mPermissionDataProvider == null) {
     mPermissionDataProvider = PermissionDataProvider.getInstance(getActivity());
   }
   if (mCommonDataProvider == null) {
     mCommonDataProvider = CommonDataProvider.getInstance(getActivity());
   }
   if (mPushDataProvider == null) {
     mPushDataProvider = PushDataProvider.getInstance(getActivity());
   }
   if (mTimeConvertProvider == null) {
     mTimeConvertProvider = TimeConvertProvider.getInstance(getActivity());
   }
   if (mImm == null) {
     mImm = (InputMethodManager) mContext.getSystemService(mContext.INPUT_METHOD_SERVICE);
   }
 }
 @Override
 public void onDestroy() {
   if (BuildConfig.DEBUG) {
     Log.i(TAG, "onDestroy");
   }
   if (mCommonDataProvider != null) {
     mCommonDataProvider.cancelAll(TAG);
   }
   if (mBaseFragmentLayout != null) {
     mBaseFragmentLayout.onDestroy();
   }
   if (mPopup != null) {
     mPopup.dismiss();
   }
   mIsDestroy = true;
   unRegisterBroadcast();
   super.onDestroy();
 }