Exemplo n.º 1
0
 public void onDisable(int accountPos) {
   if (beneficiary_rg.getVisibility() != View.VISIBLE) {
     return;
   }
   AccountsModel mAccountsModel = getAccountsModel();
   String accountCode = null;
   if (mAccountsModel != null) {
     accountCode = mAccountsModel.getAccountCode();
   }
   accountPos = -1;
   if (accountCode != null && iBanCardaccounts != null) {
     int size = iBanCardaccounts.size();
     for (int i = 0; i < size; i++) {
       if (accountCode.equals(iBanCardaccounts.get(i).getAccountCode())) {
         accountPos = i;
         break;
       }
     }
   }
   if (disAblePosition == accountPos) {
     return;
   }
   if (disAblePosition >= 0) {
     Holder mHolder = (Holder) beneficiary_rg.getChildAt(disAblePosition).getTag();
     mHolder.onEnable(true);
   }
   disAblePosition = accountPos;
   if (disAblePosition >= 0) {
     Holder mHolder = (Holder) beneficiary_rg.getChildAt(disAblePosition).getTag();
     mHolder.onEnable(false);
   }
 }
Exemplo n.º 2
0
  public CardsBarGraphic(Context context, DashBoardModel model) {
    super(context);
    this.dataList = model.getDashboardDataList();
    setTextLeft("WITHDRAWALS");

    String num = "";
    for (AccountsModel accountsModel : Contants.cardAccounts) {

      if (model.getAccountCode().equals(accountsModel.getAccountCode())) {
        num = accountsModel.getCardNumber();
      }
    }
    setTextRight("Card XXXX XXXX XXXX " + num);
  }
Exemplo n.º 3
0
 public void setAccounts(List<AccountsModel> accounts) {
   iBanCardaccounts = accounts;
   user_my_card_sbtn.setEnabled(accounts != null && accounts.size() > 0);
   selectedPosition = -1;
   disAblePosition = -1;
   AccountsModel payer = getAccountsModel();
   if (accounts != null) {
     int length = accounts.size();
     for (int i = 0; i < length; i++) {
       Holder mHolder;
       if (i + 1 < beneficiary_rg.getChildCount() - 1) {
         mHolder = (Holder) beneficiary_rg.getChildAt(i + 1).getTag();
       } else {
         View itemView =
             mLayoutInflater.inflate(R.layout.bper_payment_entry_beneficiary_item, null);
         itemView.setOnClickListener(mItemOnClickListener);
         beneficiary_rg.addView(itemView);
         mHolder = new Holder(itemView);
       }
       AccountsModel mAccountsModel = accounts.get(i);
       if (payer != null && payer.getAccountCode().equals(mAccountsModel.getAccountCode())) {
         disAblePosition = i;
       }
       mHolder.setData(i, mAccountsModel);
       if (i == length - 1) {
         mHolder.divider.setVisibility(View.GONE);
       } else {
         mHolder.divider.setVisibility(View.VISIBLE);
       }
     }
     for (int i = beneficiary_rg.getChildCount() - 1; i > length; i--) {
       beneficiary_rg.getChildAt(i).setVisibility(View.GONE);
     }
   }
   mPaymentStepViewUtils.view.setFocusable(true);
   mPaymentStepViewUtils.view.requestFocusFromTouch();
 }