Пример #1
0
 public boolean checkLogin() {
   if (AccountModel.getInstance().getAccount() == null) {
     getView().startActivity(new Intent(getView().getActivity(), LoginActivity.class));
     return false;
   } else {
     return true;
   }
 }
Пример #2
0
 public void send(String code) {
   getView().getExpansion().showProgressDialog("注册中");
   AccountModel.getInstance()
       .register(number, password, code)
       .finallyDo(() -> getView().getExpansion().dismissProgressDialog())
       .subscribe(
           new ServiceResponse<Object>() {
             @Override
             public void onNext(Object o) {
               getView().setResult(Activity.RESULT_OK);
               getView().finish();
             }
           });
 }
Пример #3
0
 @Override
 protected void onCreateView(DrawerFragment view) {
   super.onCreateView(view);
   showPlaceFragment();
   AccountModel.getInstance().registerAccountUpdate(this);
 }