contacts, contact picker and trnasfer account look up ui

This commit is contained in:
2026-05-13 02:15:53 +05:00
parent c49cce0cf2
commit b452940ed0
19 changed files with 1284 additions and 35 deletions
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/colorOnSurfaceVariant"
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>
@@ -6,13 +6,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"
app:tabGravity="start" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -37,6 +30,13 @@
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"
app:tabGravity="start" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
@@ -86,6 +86,39 @@
</LinearLayout>
<!-- Pending Finances card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:cardElevation="1dp"
app:cardCornerRadius="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dashboard_pending_finances"
android:textAppearance="?attr/textAppearanceLabelSmall"
android:textColor="?attr/colorOnSurfaceVariant" />
<TextView
android:id="@+id/tvPendingFinances"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="MVR —"
android:textAppearance="?attr/textAppearanceTitleMedium" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Card support WIP -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
+99 -11
View File
@@ -45,23 +45,111 @@
</com.google.android.material.textfield.TextInputLayout>
<!-- To account number -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilTo"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
<!-- To field row: input + pick contact button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/transfer_to"
android:layout_marginBottom="16dp">
android:orientation="horizontal"
android:gravity="center_vertical">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etTo"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilTo"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:hint="@string/transfer_to"
app:endIconMode="custom"
app:endIconDrawable="@android:drawable/ic_menu_search"
app:endIconContentDescription="@string/transfer_lookup_account">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etTo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnPickContact"
style="@style/Widget.Material3.Button.IconButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
app:icon="@drawable/ic_contacts"
android:contentDescription="@string/transfer_pick_contact" />
</LinearLayout>
<!-- Confirmed account info card (shown after successful lookup) -->
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardToInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:cardCornerRadius="4dp"
app:cardElevation="0dp"
app:strokeWidth="1dp"
app:strokeColor="?attr/colorPrimary">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:maxLines="1" />
android:orientation="horizontal"
android:paddingStart="12dp"
android:paddingEnd="4dp"
android:paddingVertical="12dp"
android:gravity="center_vertical">
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/ivToPhoto"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="12dp"
app:shapeAppearanceOverlay="@style/ShapeAppearance.Circle" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tvToAccountName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBodyMedium"
android:textStyle="bold"
android:textColor="?attr/colorOnSurface" />
<TextView
android:id="@+id/tvToBankBic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?attr/colorOnSurfaceVariant" />
</LinearLayout>
<ImageButton
android:id="@+id/btnClearToInfo"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@android:drawable/ic_menu_close_clear_cancel"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/transfer_clear_recipient" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<View
android:id="@+id/spacerTo"
android:layout_width="match_parent"
android:layout_height="16dp" />
<!-- Amount -->
<com.google.android.material.textfield.TextInputLayout
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="10dp"
android:minHeight="64dp"
android:gravity="center_vertical"
android:background="?attr/selectableItemBackground">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/ivIcon"
android:layout_width="44dp"
android:layout_height="44dp"
android:scaleType="centerCrop"
app:shapeAppearanceOverlay="@style/ShapeAppearance.Circle" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="12dp"
android:orientation="vertical">
<TextView
android:id="@+id/tvPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBodyMedium"
android:textStyle="bold"
android:textColor="?attr/colorOnSurface"
android:maxLines="1"
android:ellipsize="end" />
<TextView
android:id="@+id/tvSecondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:maxLines="1"
android:ellipsize="end" />
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tvHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="6dp"
android:textAppearance="?attr/textAppearanceLabelSmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:letterSpacing="0.08" />
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="4dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
app:startIconDrawable="@android:drawable/ic_menu_search"
app:boxCornerRadiusTopStart="24dp"
app:boxCornerRadiusTopEnd="24dp"
app:boxCornerRadiusBottomStart="24dp"
app:boxCornerRadiusBottomEnd="24dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etSheetSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/contacts_search_hint"
android:inputType="text"
android:maxLines="1"
android:imeOptions="actionSearch" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/sheetCategoryTabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"
app:tabGravity="start" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sheetRecyclerView"
android:layout_width="match_parent"
android:layout_height="400dp"
android:clipToPadding="false"
android:paddingBottom="24dp" />
</LinearLayout>
+14 -1
View File
@@ -74,6 +74,7 @@
<string name="work_in_progress">Work in progress</string>
<!-- Dashboard -->
<string name="dashboard_pending_finances">Pending Finances</string>
<string name="balance_mvr">MVR Total</string>
<string name="balance_usd">USD Total</string>
<string name="card_support_wip">Card Support</string>
@@ -94,14 +95,26 @@
<string name="available_balance">Available Balance</string>
<!-- Transfer -->
<string name="transfer_tab_quick">Quick Transfer</string>
<string name="transfer_tab_contacts">Contacts</string>
<string name="transfer_from">From account</string>
<string name="transfer_to">To account number</string>
<string name="transfer_to">Account Number or Favara ID</string>
<string name="transfer_my_accounts">My Accounts</string>
<string name="transfer_same_as_from">This is the same account as the sender</string>
<string name="transfer_lookup_account">Look up account</string>
<string name="transfer_clear_recipient">Clear recipient</string>
<string name="transfer_pick_contact">Pick contact</string>
<string name="transfer_enter_account_first">Enter an account number first</string>
<string name="transfer_account_not_found">Account not found</string>
<string name="transfer_session_unavailable">Session unavailable — please re-login</string>
<string name="transfer_amount">Amount</string>
<string name="transfer_remarks">Remarks</string>
<!-- Contacts -->
<string name="contacts_empty">No contacts found</string>
<string name="contacts_search_hint">Search contacts</string>
<string name="contacts_tab_recents">Recents</string>
<string name="recents_remove">Remove from recents</string>
<string name="contacts_tab_all">All</string>
<!-- Financing -->