Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.87 KB | None | 0 0
  1.    @Override
  2.     public void onAttach(Context context) {
  3.         super.onAttach(context);
  4.  
  5.         Bundle bundle = getActivity().getIntent().getExtras();
  6.         if(bundle!=null) {
  7.             mDeposit = (Deposit) bundle.getSerializable(DEPOSIT_INFO);
  8.         }
  9.     }
  10.  
  11.     @Override
  12.     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  13.  
  14.         View view = inflater.inflate(R.layout.fragment_deposit, container, false);
  15.  
  16.         mCustomTopBar = (CustomLoggedTopBar) view.findViewById(R.id.deposit_topbar);
  17.         mChatArea = (LinearLayout)  view.findViewById(R.id.deposit_chat);
  18.         mBankName = (TextView)  view.findViewById(R.id.deposit_bank_name);
  19.         mBankCode = (TextView)  view.findViewById(R.id.deposit_bank_code);
  20.         mAgency = (CustomDepositInfoRow)  view.findViewById(R.id.deposit_agency);
  21.         mAccount = (CustomDepositInfoRow)  view.findViewById(R.id.deposit_account);
  22.         mFavored = (CustomDepositInfoRow)  view.findViewById(R.id.deposit_favored);
  23.         mCnpj = (CustomDepositInfoRow)  view.findViewById(R.id.deposit_cnpj);
  24.         mCancelBtn = (Button)  view.findViewById(R.id.deposit_cancel);
  25.         mBankImage = (ImageView)  view.findViewById(R.id.deposit_bank_image);
  26.  
  27.         return view;
  28.     }
  29.  
  30.     @Override
  31.     public void onResume() {
  32.         super.onResume();
  33.         populateView();
  34.     }
  35.  
  36.     private void populateView(){
  37.  
  38.         mBankName.setText(mDeposit.getPaymentBankName());
  39.         mBankCode.setText(mDeposit.getPaymentBankCode());
  40.         mAgency.setValue(mDeposit.getPaymentBankAgency());
  41.         mAccount.setValue(mDeposit.getPaymentBankAccount());
  42.         mFavored.setValue(mDeposit.getPaymentBeneficiaryName());
  43.         mCnpj.setValue(mDeposit.getPaymentBeneficiaryCNPJ());
  44. //        setBankImage(mWithdraw.getPaymentBankCode());
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement