@Override
  public void onClick(final View view) {
    switch (view.getId()) {
      case R.id.btn_right:
        mDialog.dismiss();
        break;

      case R.id.btn_left:
        mPreferences.delete(PreferenceConstants.AUTORIZATION_TOKEN);
        Constants.setAuthTOken("");
        Constants.setCustServiceObj(null);
        Constants.setMyCheckServerData(null);
        Constants.setCCServiceObj(null);

        Moneymart.getInstance().myChecksList = new ArrayList<ChecksObject>();
        Moneymart.getInstance().myCheckUploadQueue =
            new LinkedHashMap<String, MyChecksDataObject>();
        Moneymart.getInstance().failedChecksList = new TreeMap<String, ChecksObject>();
        Intent intent = new Intent(this, LoginActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
        finish();
        break;

      default:
        break;
    }
  }
Beispiel #2
0
 /*
  * (non-Javadoc)
  * @see com.dfc.moneymartus.business.DataObject#setJSONValues(java.lang.String)
  */
 @Override
 public void setJSONValues(String values) {
   Gson gson = new Gson();
   CCServicesDataObject custService = gson.fromJson(values, CCServicesDataObject.class);
   Constants.setCCServiceObj(custService);
   mViewCallback.onCCServiceSuccess(custService);
 }
  @SuppressLint("RtlHardcoded")
  @Override
  protected void onResume() {
    super.onResume();
    Log.e("isFirstLaunch", ":" + mPreferences.getBoolean(Constants.isFirstLaunch));
    if (Constants.isOpenDrawer) {
      Constants.setOpenDrawer(false);
      mDrawerLayout.openDrawer(Gravity.LEFT);
      if (!mPreferences.getBoolean(Constants.isFirstLaunch))
        mPreferences.addOrUpdateBoolean(Constants.isFirstLaunch, true);
      Util.setFragmentActionBarTitle(
          HomeActivityCanada.this, getResources().getString(R.string.navigation_menu_my_checks));
    }

    /*	if(!isIntialLaunch){
    	mDrawerLayout.openDrawer(Gravity.LEFT);
    	isIntialLaunch = true;
    	MMUtil.setFragmentActionBarTitle(HomeActivity.this, "");
    }*/
  }
 public void loanFragment() {
   Constants.setPrimary(true);
   fragment = new LoanFragment();
 }
 public void faqFragment() {
   Constants.setPrimary(true);
   fragment = new FaqMoneyMartFragment();
 }
 public void storeLocatorFragment() {
   Constants.setPrimary(true);
   fragment = new StoreLocatorFragment();
 }
 public void contactUsFragment() {
   Constants.setPrimary(true);
   fragment = new ContactMoneymartFragment();
 }
 public void accountDetailFragment() {
   Constants.setPrimary(true);
   fragment = new AccountDetailsFragment();
 }
 public void personalDetailFragment() {
   Constants.setPrimary(true);
   fragment = new PersonalDetailsFragment();
   //	startActivity(new Intent(this, RegistrationActivity.class));
 }
Beispiel #10
0
 public void learnMoreFragment() {
   Constants.setPrimary(true);
   fragment = new LearnMoreFragment();
 }
Beispiel #11
0
 public void cardDetailFragment() {
   Constants.setPrimary(true);
   fragment = new CardDetailsFragment();
 }