- row = itemView.findViewById(R.id.account_summary_row);
- tvAccountName = itemView.findViewById(R.id.account_row_acc_name);
- tvAccountAmounts = itemView.findViewById(R.id.account_row_acc_amounts);
- expanderContainer = itemView.findViewById(R.id.account_expander_container);
- expander = itemView.findViewById(R.id.account_expander);
- accountExpanderContainer =
- itemView.findViewById(R.id.account_row_amounts_expander_container);
+ static class HeaderRowHolder extends RowHolder {
+ private final AccountListSummaryRowBinding b;
+ public HeaderRowHolder(@NonNull AccountListSummaryRowBinding binding) {
+ super(binding.getRoot());
+ b = binding;
+ }
+ @Override
+ public void bind(AccountListItem item) {
+ Resources r = itemView.getResources();
+ Logger.debug("acc", itemView.getContext()
+ .toString());
+ ((AccountListItem.Header) item).getText()
+ .observe((LifecycleOwner) itemView.getContext(),
+ b.lastUpdateText::setText);
+ }
+ }
+
+ class AccountRowHolder extends AccountSummaryAdapter.RowHolder {
+ private final AccountListRowBinding b;
+ public AccountRowHolder(@NonNull AccountListRowBinding binding) {
+ super(binding.getRoot());
+ b = binding;