private void populateItems() { items.clear(); items.add(new ProfileEditor()); Client client = ClientsIO.getDetailClient(); for (Phone p : client.getPhones()) items.add(p); for (Note n : client.getNotes()) items.add(n); }
private void configureEditorViewHolder(EditorViewHolder holder, int position) { String totalDebt = Integer.toString(ClientsIO.getDetailClient().getTotalDebt()); String totalInterest = Integer.toString(ClientsIO.getDetailClient().getTotalInterest()); holder.mTotalDebt.setText(totalDebt); holder.mTotalInterest.setText(totalInterest); holder.mAddPhone.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { showNumberDialog(); } }); holder.mAddNote.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { showNoteCreateDialog(); } }); }