From 60a85a18cc2074b87721173798497260dbc800e5 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 6 Dec 2018 21:05:36 +0000 Subject: [PATCH] home is account summary, latest transactions is a new item the account summary has some boilerplate views for now --- app/src/main/AndroidManifest.xml | 12 +-- ...tTransactions.java => AccountSummary.java} | 2 +- .../mobileledger/NewTransactionActivity.java | 2 +- .../ktnx/mobileledger/SettingsActivity.java | 2 +- .../res/drawable/ic_event_note_black_24dp.xml | 10 +++ ...ction.xml => activity_account_summary.xml} | 0 .../layout/app_bar_latest_transactions.xml | 4 +- .../res/layout/content_account_summary.xml | 73 +++++++++++++++++++ .../layout/content_latest_transactions.xml | 34 --------- .../res/layout/content_new_transaction.xml | 2 +- app/src/main/res/layout/drawer.xml | 9 ++- app/src/main/res/values-bg/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 13 files changed, 105 insertions(+), 47 deletions(-) rename app/src/main/java/net/ktnx/mobileledger/{LatestTransactions.java => AccountSummary.java} (98%) create mode 100644 app/src/main/res/drawable/ic_event_note_black_24dp.xml rename app/src/main/res/layout/{activity_new_transaction.xml => activity_account_summary.xml} (100%) create mode 100644 app/src/main/res/layout/content_account_summary.xml delete mode 100644 app/src/main/res/layout/content_latest_transactions.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b981e478..926fc763 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,8 +13,8 @@ android:theme="@style/AppTheme" android:fullBackupContent="@xml/backup_descriptor"> @@ -25,19 +25,19 @@ + android:parentActivityName=".AccountSummary"> + android:value="net.ktnx.mobileledger.AccountSummary" /> + android:value="net.ktnx.mobileledger.AccountSummary" /> diff --git a/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java similarity index 98% rename from app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java rename to app/src/main/java/net/ktnx/mobileledger/AccountSummary.java index 27ea5cd2..e8cf0398 100644 --- a/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java +++ b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java @@ -25,7 +25,7 @@ import static android.view.View.GONE; import static net.ktnx.mobileledger.MobileLedgerDB.db; import static net.ktnx.mobileledger.MobileLedgerDB.set_option_value; -public class LatestTransactions extends AppCompatActivity { +public class AccountSummary extends AppCompatActivity { DrawerLayout drawer; private static long account_list_last_updated; diff --git a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java index dca8d463..a9d6097a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java @@ -60,7 +60,7 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.activity_new_transaction); + setContentView(R.layout.activity_account_summary); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); diff --git a/app/src/main/java/net/ktnx/mobileledger/SettingsActivity.java b/app/src/main/java/net/ktnx/mobileledger/SettingsActivity.java index 9e49c46f..7d84fe0c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/SettingsActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/SettingsActivity.java @@ -42,7 +42,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity { private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = (preference, value) -> { String stringValue = value.toString(); - LatestTransactions.preferences_changed(); + AccountSummary.preferences_changed(); if (preference instanceof ListPreference) { // For list preferences, look up the correct display value in diff --git a/app/src/main/res/drawable/ic_event_note_black_24dp.xml b/app/src/main/res/drawable/ic_event_note_black_24dp.xml new file mode 100644 index 00000000..94381597 --- /dev/null +++ b/app/src/main/res/drawable/ic_event_note_black_24dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/activity_new_transaction.xml b/app/src/main/res/layout/activity_account_summary.xml similarity index 100% rename from app/src/main/res/layout/activity_new_transaction.xml rename to app/src/main/res/layout/activity_account_summary.xml diff --git a/app/src/main/res/layout/app_bar_latest_transactions.xml b/app/src/main/res/layout/app_bar_latest_transactions.xml index 45daa4e2..05591be8 100644 --- a/app/src/main/res/layout/app_bar_latest_transactions.xml +++ b/app/src/main/res/layout/app_bar_latest_transactions.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".LatestTransactions"> + tools:context=".AccountSummary"> - + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/content_latest_transactions.xml b/app/src/main/res/layout/content_latest_transactions.xml deleted file mode 100644 index 1eb4c385..00000000 --- a/app/src/main/res/layout/content_latest_transactions.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/content_new_transaction.xml b/app/src/main/res/layout/content_new_transaction.xml index b4b6babe..0d284493 100644 --- a/app/src/main/res/layout/content_new_transaction.xml +++ b/app/src/main/res/layout/content_new_transaction.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context=".NewTransactionActivity" - tools:showIn="@layout/activity_new_transaction"> + tools:showIn="@layout/activity_account_summary"> + + + diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index b6d39b1d..ab25a3fa 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -24,4 +24,5 @@ Описание Заредени са %d сметки Запазване + Сметките накратко \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 24bd8ecd..75e444d4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -68,4 +68,5 @@ %d accounts loaded Description Save + Account Summary -- 2.39.5