forked from thijooree/android
Replaces Contacts in the default bottom nav slot with a Chats page (Contacts moves to More and opens from the Chats toolbar). - Chats start when the page is first opened; no old history is loaded - Transfers come from BML notifications (instant), account history (booked later) and in-app receipts, merged into one bubble each - Chats are keyed by the account holder's real name, looked up via BML account validation, so nickname contacts and their MVR/USD accounts share one chat; the To bar picks the account to send to - Sending opens the Transfer page in a bottom sheet over the chat and returns to it on success; sent bubbles link to their receipt - Chat and name data are stored encrypted with CacheEncryption Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
2.5 KiB
XML
63 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/selectableItemBackground"
|
|
android:paddingHorizontal="16dp"
|
|
android:paddingVertical="10dp">
|
|
|
|
<com.google.android.material.imageview.ShapeableImageView
|
|
android:id="@+id/ivAvatar"
|
|
android:layout_width="52dp"
|
|
android:layout_height="52dp"
|
|
app:shapeAppearanceOverlay="@style/ShapeAppearance.Circle"
|
|
android:scaleType="centerCrop"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvName"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="12dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
|
android:textStyle="bold"
|
|
android:textColor="?attr/colorOnSurface"
|
|
android:maxLines="1"
|
|
android:ellipsize="end"
|
|
app:layout_constraintStart_toEndOf="@id/ivAvatar"
|
|
app:layout_constraintEnd_toStartOf="@id/tvTime"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toTopOf="@id/tvPreview"
|
|
app:layout_constraintVertical_chainStyle="packed" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvTime"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?attr/textAppearanceLabelSmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBaseline_toBaselineOf="@id/tvName" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvPreview"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="12dp"
|
|
android:layout_marginTop="2dp"
|
|
android:textAppearance="?attr/textAppearanceBodyMedium"
|
|
android:textColor="?attr/colorOnSurfaceVariant"
|
|
android:maxLines="1"
|
|
android:ellipsize="end"
|
|
app:layout_constraintStart_toEndOf="@id/ivAvatar"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/tvName"
|
|
app:layout_constraintBottom_toBottomOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|