Exemplo n.º 1
0
      public void setData(int position, AccountsModel mAccountsModel) {
        this.position = position;
        this.mAccountsModel = mAccountsModel;
        if (mAccountsModel.getAccountAlias() != null) {
          name_tv.setText(mAccountsModel.getAccountAlias());
        } else {
          name_tv.setText("");
        }

        if (mAccountsModel.getCardHolder() != null) {
          iban.setText(mAccountsModel.getCardHolder());
        } else {
          iban.setText("");
        }

        String cardNumber = mAccountsModel.getCardNumber();
        if (cardNumber == null) {
          cardNumber = "";
        }
        avilable_banlence_tv.setText(cardNumber);
        if (mAccountsModel.getIsPreferred()) {
          isPreferredStar.setVisibility(View.VISIBLE);
        } else {
          isPreferredStar.setVisibility(View.GONE);
        }

        if (disAblePosition == position) {
          onEnable(false);
        } else {
          rbtn.setChecked(selectedPosition == position);
          name_tv.setTextColor(name_tv.getResources().getColor(R.color.black));
          itemView.setEnabled(true);
          rbtn.setEnabled(true);
        }
      }
 public void setAccountsModel(AccountsModel mAccountsModel) {
   mAccountInfoTitle.accountName.setText(mAccountsModel.getAccountAlias());
   String money =
       Utils.generateFormatMoney(
           contentView.getContext().getResources().getString(R.string.eur),
           mAccountsModel.getAccountBalance());
   mAccountInfoTitle.account_balance_value.setText(money);
   money =
       Utils.generateFormatMoney(
           contentView.getContext().getResources().getString(R.string.eur),
           mAccountsModel.getAvailableBalance());
   mAccountInfoTitle.available_balance_value.setText(money);
   if (mAccountsModel.getIsPreferred()) {
     mAccountInfoTitle.setPerferredStar(AccountInfoTitle.PAYMENT);
   } else {
     mAccountInfoTitle.isPerferredStar.setVisibility(View.GONE);
   }
 }