コード例 #1
0
 @Override
 public void onResume() {
   super.onResume();
   if (!mDataManager.loginDataExists()) {
     mActivity.switchContent(BootableFragmentsEnum.ACCOUNT, true);
   }
 }
コード例 #2
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   mDataManager = new SharedPrefDataManager(mActivity.getApplicationContext());
   if (!mDataManager.loginDataExists()) {
     mActivity.switchContent(BootableFragmentsEnum.ACCOUNT, true);
     return null;
   }
   View mainView = (View) inflater.inflate(R.layout.fragment_student_services, container, false);
   return mainView;
 }