Files
thijooree/docs/thijooree/08-contacts.md
T
shihaam 86e1e66a20
Auto Tag on Version Change / check-version (push) Failing after 14m45s
update docs
2026-05-30 19:33:15 +05:00

2.3 KiB

Contacts

The contacts screen stores and manages frequently used transfer recipients. Contacts are local to the app and never synced externally.


Fragment — ContactsFragment

Displays the full contact list as a RecyclerView. Observes HomeViewModel.contacts and HomeViewModel.contactCategories.


Contact List

Each contact row shows:

  • Circular avatar (profile image if set, otherwise initials placeholder)
  • Display name
  • Account number(s)
  • Category chip (if assigned)

Tapping a contact row opens AddContactSheetFragment in edit mode.

Tapping the Transfer button on a contact row opens TransferFragment with the recipient pre-filled.


Categories

Contacts can be assigned to user-defined categories (e.g., "Family", "Business"). Categories appear as filter chips at the top of the list. Tapping a chip filters the list to that category. Tapping again clears the filter.


Add Contact — AddContactSheetFragment

A bottom sheet for creating or editing a contact.

Fields

Field Notes
Name Display name
Account number Primary transfer account number
Bank Optional — for display only
Category Optional; selectable from existing categories or create new
Profile image Optional; select from gallery or camera

Profile Image

The pencil icon next to the avatar opens a chooser:

  • Gallery — pick from device gallery
  • Camera — capture a new photo (temp file in cacheDir)

The image is stored locally in filesDir/profile_images/ via ProfileImageStore with key "contact_{id}".

Save

On save, the contact is persisted to the local database and HomeViewModel.contacts is refreshed.

Delete

A delete button (with confirmation dialog) removes the contact and its profile image.


Contact Picker — ContactPickerSheetFragment

A compact bottom sheet version of the contact list, used by TransferFragment when the user taps Choose Contact.

  • Shows all contacts with avatar and name
  • Search bar filters by name or account number
  • Tapping a contact returns the selection to TransferFragment and dismisses the sheet
  • Profile images use a "local:{key}" synthetic hash prefix to identify locally stored images

 


← Transfer     Next → Activities