optimize bml and mib recipt to be 1:1
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 3s
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 3s
This commit is contained in:
@@ -416,7 +416,8 @@ class BmlLoginFlow {
|
||||
BmlTransferResult(
|
||||
success = true,
|
||||
reference = payload?.optString("reference") ?: "",
|
||||
timestamp = payload?.optString("timestamp") ?: ""
|
||||
timestamp = payload?.optString("timestamp") ?: "",
|
||||
message = json.optString("message")
|
||||
)
|
||||
}
|
||||
} catch (_: Exception) { BmlTransferResult(false, errorMessage = "Parse error") }
|
||||
|
||||
@@ -20,6 +20,7 @@ data class BmlTransferResult(
|
||||
val success: Boolean,
|
||||
val reference: String = "",
|
||||
val timestamp: String = "",
|
||||
val message: String = "",
|
||||
val errorMessage: String = ""
|
||||
)
|
||||
|
||||
|
||||
@@ -558,7 +558,8 @@ class TransferFragment : Fragment() {
|
||||
remarks = remarks,
|
||||
bmlFromName = src.accountBriefName,
|
||||
bmlReference = result.reference,
|
||||
bmlTimestamp = result.timestamp
|
||||
bmlTimestamp = result.timestamp,
|
||||
bmlMessage = result.message
|
||||
)
|
||||
val time = result.timestamp.take(19).replace("T", " ")
|
||||
Triple(true, "Reference: ${result.reference}\n$time", receipt)
|
||||
|
||||
@@ -18,4 +18,5 @@ data class TransferReceiptData(
|
||||
val bmlFromName: String = "",
|
||||
val bmlReference: String = "",
|
||||
val bmlTimestamp: String = "",
|
||||
val bmlMessage: String = "",
|
||||
)
|
||||
|
||||
@@ -61,6 +61,7 @@ class TransferReceiptFragment : Fragment() {
|
||||
private const val ARG_BML_FROM_NAME = "bml_from_name"
|
||||
private const val ARG_BML_REFERENCE = "bml_reference"
|
||||
private const val ARG_BML_TIMESTAMP = "bml_timestamp"
|
||||
private const val ARG_BML_MESSAGE = "bml_message"
|
||||
|
||||
// Holds the already-rendered to-avatar bitmap from TransferFragment
|
||||
var pendingToAvatarBitmap: Bitmap? = null
|
||||
@@ -83,6 +84,7 @@ class TransferReceiptFragment : Fragment() {
|
||||
putString(ARG_BML_FROM_NAME, data.bmlFromName)
|
||||
putString(ARG_BML_REFERENCE, data.bmlReference)
|
||||
putString(ARG_BML_TIMESTAMP, data.bmlTimestamp)
|
||||
putString(ARG_BML_MESSAGE, data.bmlMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,7 +149,7 @@ class TransferReceiptFragment : Fragment() {
|
||||
binding.tvToBank.text = args.getString(ARG_TO_BANK, "")
|
||||
binding.tvTransactionDate.text = args.getString(ARG_MIB_DATE, "")
|
||||
binding.tvValueDate.text = args.getString(ARG_MIB_DATE, "")
|
||||
binding.tvPurpose.text = args.getString(ARG_REMARKS, "").ifBlank { "-" }
|
||||
binding.tvPurpose.text = args.getString(ARG_REMARKS, "")
|
||||
}
|
||||
|
||||
private fun loadProfileImage(hash: String, isProfile: Boolean, onLoaded: (Bitmap) -> Unit) {
|
||||
@@ -181,7 +183,9 @@ class TransferReceiptFragment : Fragment() {
|
||||
|
||||
binding.tvAmountValue.text = formattedAmount
|
||||
binding.tvAmountCurrency.text = currency
|
||||
binding.tvMessageRow.text = "Thank you. Transfer transaction is successful."
|
||||
val apiMessage = args.getString(ARG_BML_MESSAGE, "")
|
||||
binding.tvMessage.text = apiMessage
|
||||
binding.tvMessageRow.text = apiMessage
|
||||
binding.tvReference.text = args.getString(ARG_BML_REFERENCE, "")
|
||||
binding.tvTransactionDate.text = formatBmlTimestamp(args.getString(ARG_BML_TIMESTAMP, ""))
|
||||
binding.tvFrom.text = args.getString(ARG_BML_FROM_NAME, "").ifBlank {
|
||||
|
||||
14
app/src/main/res/drawable/ic_arrow_right.xml
Normal file
14
app/src/main/res/drawable/ic_arrow_right.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M 3,12 H 21 M 14,5 L 21,12 L 14,19"
|
||||
android:strokeColor="#49454F"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="@android:color/transparent" />
|
||||
</vector>
|
||||
@@ -13,6 +13,7 @@
|
||||
android:id="@+id/receiptCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:orientation="vertical"
|
||||
android:background="#FFFFFF">
|
||||
|
||||
@@ -36,7 +37,6 @@
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:id="@+id/tvMessage"
|
||||
android:text="Thank you. Transfer transaction is successful."
|
||||
android:textSize="14sp"
|
||||
android:textColor="#2D2D2D"
|
||||
android:fontFamily="@font/nunito_sans"
|
||||
@@ -50,7 +50,7 @@
|
||||
<!-- ══════════════════════════════════════════════════════════════════ -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="70dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
@@ -59,38 +59,32 @@
|
||||
android:scaleType="fitXY"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/tvAmountValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="14dp">
|
||||
|
||||
<!-- Amount — SofiaPro 68px → 42sp, #242424 -->
|
||||
<TextView
|
||||
android:id="@+id/tvAmountValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="42sp"
|
||||
android:textColor="#242424"
|
||||
android:fontFamily="@font/sofia_pro"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- Currency — SofiaPro 40px → 20sp, #7E7E7E -->
|
||||
<TextView
|
||||
android:id="@+id/tvAmountCurrency"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#7E7E7E"
|
||||
android:fontFamily="@font/sofia_pro"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="13dp"
|
||||
android:textSize="42sp"
|
||||
android:textColor="#242424"
|
||||
android:fontFamily="@font/sofia_pro"
|
||||
android:gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Currency — floats below wave on transparent background -->
|
||||
<TextView
|
||||
android:id="@+id/tvAmountCurrency"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="-19dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#7E7E7E"
|
||||
android:fontFamily="@font/sofia_pro"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- ══════════════════════════════════════════════════════════════════ -->
|
||||
<!-- Body rows -->
|
||||
<!-- Labels: SofiaPro 28px → 13sp, #000000, left-aligned -->
|
||||
@@ -150,7 +144,7 @@
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:gravity="end">
|
||||
<TextView android:id="@+id/tvToName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#808080" android:fontFamily="@font/sofia_pro" android:gravity="end" />
|
||||
<TextView android:id="@+id/tvToAccount" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:textSize="13sp" android:textColor="#808080" android:fontFamily="@font/sofia_pro" android:gravity="end" />
|
||||
<TextView android:id="@+id/tvToAccount" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:textSize="15sp" android:textColor="#808080" android:fontFamily="@font/sofia_pro" android:gravity="end" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#E9E9E9" />
|
||||
|
||||
@@ -5,21 +5,20 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#FFFFFF">
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<!-- Renderable receipt card (header grows to fill remaining space) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/receiptCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="40dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Green header — fills all space not taken by body -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="200dp"
|
||||
android:background="@drawable/trx_success_bg">
|
||||
|
||||
<LinearLayout
|
||||
@@ -36,7 +35,7 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:letterSpacing="0.08"
|
||||
android:layout_marginBottom="16dp" />
|
||||
android:layout_marginBottom="22dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64dp"
|
||||
@@ -50,9 +49,8 @@
|
||||
android:text="SUCCESSFUL"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:letterSpacing="0.05"
|
||||
android:layout_marginTop="12dp" />
|
||||
android:layout_marginTop="18dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -94,19 +92,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#1C1B1F"
|
||||
android:textColor="#565656"
|
||||
android:gravity="center"
|
||||
android:maxLines="2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:text="→"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#49454F" />
|
||||
android:src="@drawable/ic_arrow_right"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -127,7 +124,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#1C1B1F"
|
||||
android:textColor="#565656"
|
||||
android:gravity="center"
|
||||
android:maxLines="2" />
|
||||
|
||||
@@ -142,8 +139,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TOTAL AMOUNT"
|
||||
android:textSize="11sp"
|
||||
android:textColor="#49454F"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#a0a2a1"
|
||||
android:letterSpacing="0.08"
|
||||
android:gravity="center"
|
||||
android:paddingTop="10dp"
|
||||
@@ -153,9 +150,8 @@
|
||||
android:id="@+id/tvAmount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#E65100"
|
||||
android:textSize="34sp"
|
||||
android:textColor="#f14f0f"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="10dp" />
|
||||
|
||||
@@ -163,49 +159,49 @@
|
||||
|
||||
<!-- Reference # -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingHorizontal="20dp" android:paddingVertical="11dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Reference #" android:textSize="13sp" android:textColor="#49454F" />
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Reference #" android:textSize="15sp" android:textColor="#a0a2a1" />
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<TextView android:id="@+id/tvReferenceNo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="13sp" android:textColor="#1C1B1F" />
|
||||
<TextView android:id="@+id/tvReferenceNo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#565656" />
|
||||
</LinearLayout>
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#CAC4D0" android:layout_marginHorizontal="20dp" />
|
||||
|
||||
<!-- To Account -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingHorizontal="20dp" android:paddingVertical="11dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="To Account" android:textSize="13sp" android:textColor="#49454F" />
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="To Account" android:textSize="15sp" android:textColor="#a0a2a1" />
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<TextView android:id="@+id/tvToAccount" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="13sp" android:textColor="#1C1B1F" />
|
||||
<TextView android:id="@+id/tvToAccount" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#565656" />
|
||||
</LinearLayout>
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#CAC4D0" android:layout_marginHorizontal="20dp" />
|
||||
|
||||
<!-- To Bank -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingHorizontal="20dp" android:paddingVertical="11dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="To Bank" android:textSize="13sp" android:textColor="#49454F" />
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="To Bank" android:textSize="15sp" android:textColor="#a0a2a1" />
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<TextView android:id="@+id/tvToBank" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="13sp" android:textColor="#1C1B1F" />
|
||||
<TextView android:id="@+id/tvToBank" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#565656" />
|
||||
</LinearLayout>
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#CAC4D0" android:layout_marginHorizontal="20dp" />
|
||||
|
||||
<!-- Transaction Date -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingHorizontal="20dp" android:paddingVertical="11dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Transaction Date" android:textSize="13sp" android:textColor="#49454F" />
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Transaction Date" android:textSize="15sp" android:textColor="#a0a2a1" />
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<TextView android:id="@+id/tvTransactionDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="13sp" android:textColor="#1C1B1F" />
|
||||
<TextView android:id="@+id/tvTransactionDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#565656" />
|
||||
</LinearLayout>
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#CAC4D0" android:layout_marginHorizontal="20dp" />
|
||||
|
||||
<!-- Value Date -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingHorizontal="20dp" android:paddingVertical="11dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Value Date" android:textSize="13sp" android:textColor="#49454F" />
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Value Date" android:textSize="15sp" android:textColor="#a0a2a1" />
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<TextView android:id="@+id/tvValueDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="13sp" android:textColor="#1C1B1F" />
|
||||
<TextView android:id="@+id/tvValueDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#565656" />
|
||||
</LinearLayout>
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#CAC4D0" android:layout_marginHorizontal="20dp" />
|
||||
|
||||
<!-- Purpose -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingHorizontal="20dp" android:paddingVertical="11dp">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Purpose" android:textSize="13sp" android:textColor="#49454F" />
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Purpose" android:textSize="15sp" android:textColor="#a0a2a1" />
|
||||
<View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" />
|
||||
<TextView android:id="@+id/tvPurpose" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="13sp" android:textColor="#1C1B1F" />
|
||||
<TextView android:id="@+id/tvPurpose" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#565656" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- MIB footer -->
|
||||
@@ -230,9 +226,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="MALDIVES ISLAMIC BANK"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#49454F"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#000000"
|
||||
android:letterSpacing="0.05" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -246,7 +241,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="#FFFFFF"
|
||||
android:background="?attr/colorSurface"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
Reference in New Issue
Block a user