]> git.ktnx.net Git - mobile-ledger.git/commitdiff
include account position in template account head
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 8 Feb 2021 05:35:58 +0000 (05:35 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 18 Feb 2021 07:32:09 +0000 (07:32 +0000)
the account block is rather large, a prominent indicator of its
sequential number seems appropriate

app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java
app/src/main/res/values-bg/strings.xml
app/src/main/res/values/strings.xml

index e0406446485cfbbf7896ddd9dae079dced9f7b54..aee8511ccb0135da963f12ef2dbc05e38f818e0c 100644 (file)
@@ -18,6 +18,7 @@
 package net.ktnx.mobileledger.ui.templates;
 
 import android.annotation.SuppressLint;
+import android.content.res.Resources;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.view.LayoutInflater;
@@ -669,11 +670,14 @@ class TemplateDetailsAdapter extends RecyclerView.Adapter<TemplateDetailsAdapter
         }
         @Override
         void bind(TemplateDetailsItem item) {
-            String groupNoText = b.getRoot()
-                                  .getResources()
-                                  .getString(R.string.template_item_match_group_source);
+            final Resources resources = b.getRoot()
+                                         .getResources();
+                String groupNoText = resources.getString(R.string.template_item_match_group_source);
 
             TemplateDetailsItem.AccountRow accRow = item.asAccountRowItem();
+            b.patternAccountLabel.setText(String.format(Locale.US,
+                    resources.getString(R.string.template_details_account_row_label),
+                    accRow.getPosition()));
             if (accRow.hasLiteralAccountName()) {
                 b.templateDetailsAccountNameLayout.setVisibility(View.VISIBLE);
                 b.templateDetailsAccountName.setText(accRow.getAccountName());
index e01445d8b6927468b4c61bd980928c693b2f4376..090b02fc404c92dce80c8a74cb3aed8a50794a3b 100644 (file)
     <string name="template_details_amount_label">Сума</string>
     <string name="template_details_test_text_label">Примерен текст</string>
     <string name="template_details_account_name_label">Сметка</string>
-    <string name="template_details_account_row_label">Данни за сметка</string>
+    <string name="template_details_account_row_label">Данни за сметка №%d</string>
     <string name="account_name_source_label">Източник на името на сметката</string>
     <string name="template_details_source_literal">ръчно въвеждане</string>
     <string name="account_comment_source_label">Източник на бележка към сметката</string>
index 4def8849422cd5642a0c0b02f04bac1c51832e7a..e7ad4b2f25fb0eca6c36f5d85b140912361f476f 100644 (file)
     <string name="template_details_amount_label">Amount</string>
     <string name="template_details_test_text_label">Test text</string>
     <string name="template_details_account_name_label">Account name</string>
-    <string name="template_details_account_row_label">Account details</string>
+    <string name="template_details_account_row_label">Details of account #%d</string>
     <string name="account_name_source_label">Account name source</string>
     <string name="template_details_source_literal">literal</string>
     <string name="account_comment_source_label">Account comment source</string>