]> git.ktnx.net Git - mobile-ledger.git/commitdiff
home is account summary, latest transactions is a new item
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 6 Dec 2018 21:05:36 +0000 (21:05 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 6 Dec 2018 21:05:36 +0000 (21:05 +0000)
the account summary has some boilerplate views for now

15 files changed:
app/src/main/AndroidManifest.xml
app/src/main/java/net/ktnx/mobileledger/AccountSummary.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java
app/src/main/java/net/ktnx/mobileledger/SettingsActivity.java
app/src/main/res/drawable/ic_event_note_black_24dp.xml [new file with mode: 0644]
app/src/main/res/layout/activity_account_summary.xml [new file with mode: 0644]
app/src/main/res/layout/activity_new_transaction.xml [deleted file]
app/src/main/res/layout/app_bar_latest_transactions.xml
app/src/main/res/layout/content_account_summary.xml [new file with mode: 0644]
app/src/main/res/layout/content_latest_transactions.xml [deleted file]
app/src/main/res/layout/content_new_transaction.xml
app/src/main/res/layout/drawer.xml
app/src/main/res/values-bg/strings.xml
app/src/main/res/values/strings.xml

index b981e478d70d60fb25183f283a26973a738baf26..926fc763bb506bce0188ce502eae1f3cf54c837b 100644 (file)
@@ -13,8 +13,8 @@
         android:theme="@style/AppTheme"
         android:fullBackupContent="@xml/backup_descriptor">
         <activity
-            android:name=".LatestTransactions"
-            android:label="@string/app_name"
+            android:name=".AccountSummary"
+            android:label="@string/account_summary_title"
             android:theme="@style/AppTheme.NoActionBar">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
         <activity
             android:name=".SettingsActivity"
             android:label="@string/title_activity_settings"
-            android:parentActivityName=".LatestTransactions">
+            android:parentActivityName=".AccountSummary">
             <meta-data
                 android:name="android.support.PARENT_ACTIVITY"
-                android:value="net.ktnx.mobileledger.LatestTransactions" />
+                android:value="net.ktnx.mobileledger.AccountSummary" />
         </activity>
         <activity
             android:name=".NewTransactionActivity"
             android:label="@string/title_activity_new_transaction"
-            android:parentActivityName=".LatestTransactions"
+            android:parentActivityName=".AccountSummary"
             android:theme="@style/AppTheme.NoActionBar">
             <meta-data
                 android:name="android.support.PARENT_ACTIVITY"
-                android:value="net.ktnx.mobileledger.LatestTransactions" />
+                android:value="net.ktnx.mobileledger.AccountSummary" />
         </activity>
     </application>
 
diff --git a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java
new file mode 100644 (file)
index 0000000..e8cf039
--- /dev/null
@@ -0,0 +1,164 @@
+package net.ktnx.mobileledger;
+
+import android.content.Intent;
+import android.content.pm.PackageInfo;
+import android.content.res.Resources;
+import android.os.Build;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.support.design.widget.Snackbar;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import java.util.Date;
+
+import static android.view.View.GONE;
+import static net.ktnx.mobileledger.MobileLedgerDB.db;
+import static net.ktnx.mobileledger.MobileLedgerDB.set_option_value;
+
+public class AccountSummary extends AppCompatActivity {
+    DrawerLayout drawer;
+
+    private static long account_list_last_updated;
+    private static boolean account_list_needs_update = true;
+    public static void preferences_changed() {
+        account_list_needs_update = true;
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_latest_transactions);
+        Toolbar toolbar = findViewById(R.id.toolbar);
+        setSupportActionBar(toolbar);
+
+        drawer = findViewById(R.id.drawer_layout);
+        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
+                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+        drawer.addDrawerListener(toggle);
+        toggle.syncState();
+
+        android.widget.TextView ver = drawer.findViewById(R.id.drawer_version_text);
+
+        try {
+            PackageInfo pi = getApplicationContext().getPackageManager().getPackageInfo(getPackageName(), 0);
+            ver.setText(pi.versionName);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        prepare_db();
+        update_accounts(false);
+    }
+
+    public void fab_new_transaction_clicked(View view) {
+        Intent intent = new Intent(this, NewTransactionActivity.class);
+        startActivity(intent);
+    }
+
+    public void nav_exit_clicked(View view) {
+        Log.w("mobileledger", "exiting");
+        finish();
+    }
+
+    public void nav_settings_clicked(View view) {
+        Intent intent = new Intent(this, SettingsActivity.class);
+        startActivity(intent);
+    }
+
+    @Override
+    public void onBackPressed() {
+        DrawerLayout drawer = findViewById(R.id.drawer_layout);
+        if (drawer.isDrawerOpen(GravityCompat.START)) {
+            drawer.closeDrawer(GravityCompat.START);
+        } else {
+            super.onBackPressed();
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        //getMenuInflater().inflate(R.menu.latest_transactions, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+
+        //noinspection SimplifiableIfStatement
+        //if (id == R.id.action_settings) {
+        //    return true;
+        // }
+
+        return super.onOptionsItemSelected(item);
+    }
+
+    private void prepare_db() {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+            MobileLedgerDB.setDb_filename(this.getApplicationInfo().deviceProtectedDataDir + "/" + MobileLedgerDB.DATABASE_NAME);
+        }
+        else {
+            MobileLedgerDB.setDb_filename(MobileLedgerDB.DATABASE_NAME);
+        }
+        MobileLedgerDB.initDB();
+
+        account_list_last_updated = MobileLedgerDB.get_option_value("last_refresh", (long) 0);
+
+    }
+
+    private void update_accounts(boolean force) {
+        long now = new Date().getTime();
+        if ((now > (account_list_last_updated + (24 * 3600*1000))) || force) {
+            Log.d("db", "accounts last updated at " + account_list_last_updated+" and now is " + now+". re-fetching");
+            update_accounts();
+        }
+    }
+
+    private void update_accounts() {
+        Resources rm = getResources();
+
+        ProgressBar pb = findViewById(R.id.progressBar);
+        pb.setVisibility(View.VISIBLE);
+        TextView pt = findViewById(R.id.textProgress);
+        pt.setVisibility(View.VISIBLE);
+        pb.setIndeterminate(true);
+
+        RetrieveAccountsTask task = new RetrieveAccountsTask() {
+            @Override
+            protected void onProgressUpdate(Integer... values) {
+                if ( values[0] == 0 )
+                    pt.setText(R.string.progress_connecting);
+                else
+                    pt.setText(String.format(getResources().getString(R.string.progress_N_accounts_loaded), values[0]));
+            }
+
+            @Override
+            protected void onPostExecute(Void result) {
+                pb.setVisibility(GONE);
+                pt.setVisibility(GONE);
+                if (this.error != 0)
+                    Snackbar.make(drawer, rm.getString(this.error), Snackbar.LENGTH_LONG );
+                else
+                    set_option_value("last_refresh", new Date().getTime() );
+            }
+        };
+
+        task.setPref(PreferenceManager.getDefaultSharedPreferences(this));
+        task.execute(db);
+
+    }
+}
diff --git a/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java b/app/src/main/java/net/ktnx/mobileledger/LatestTransactions.java
deleted file mode 100644 (file)
index 27ea5cd..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-package net.ktnx.mobileledger;
-
-import android.content.Intent;
-import android.content.pm.PackageInfo;
-import android.content.res.Resources;
-import android.os.Build;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.support.design.widget.Snackbar;
-import android.support.v4.view.GravityCompat;
-import android.support.v4.widget.DrawerLayout;
-import android.support.v7.app.ActionBarDrawerToggle;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.Toolbar;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-
-import java.util.Date;
-
-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 {
-    DrawerLayout drawer;
-
-    private static long account_list_last_updated;
-    private static boolean account_list_needs_update = true;
-    public static void preferences_changed() {
-        account_list_needs_update = true;
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_latest_transactions);
-        Toolbar toolbar = findViewById(R.id.toolbar);
-        setSupportActionBar(toolbar);
-
-        drawer = findViewById(R.id.drawer_layout);
-        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
-                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
-        drawer.addDrawerListener(toggle);
-        toggle.syncState();
-
-        android.widget.TextView ver = drawer.findViewById(R.id.drawer_version_text);
-
-        try {
-            PackageInfo pi = getApplicationContext().getPackageManager().getPackageInfo(getPackageName(), 0);
-            ver.setText(pi.versionName);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-        prepare_db();
-        update_accounts(false);
-    }
-
-    public void fab_new_transaction_clicked(View view) {
-        Intent intent = new Intent(this, NewTransactionActivity.class);
-        startActivity(intent);
-    }
-
-    public void nav_exit_clicked(View view) {
-        Log.w("mobileledger", "exiting");
-        finish();
-    }
-
-    public void nav_settings_clicked(View view) {
-        Intent intent = new Intent(this, SettingsActivity.class);
-        startActivity(intent);
-    }
-
-    @Override
-    public void onBackPressed() {
-        DrawerLayout drawer = findViewById(R.id.drawer_layout);
-        if (drawer.isDrawerOpen(GravityCompat.START)) {
-            drawer.closeDrawer(GravityCompat.START);
-        } else {
-            super.onBackPressed();
-        }
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        //getMenuInflater().inflate(R.menu.latest_transactions, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        int id = item.getItemId();
-
-        //noinspection SimplifiableIfStatement
-        //if (id == R.id.action_settings) {
-        //    return true;
-        // }
-
-        return super.onOptionsItemSelected(item);
-    }
-
-    private void prepare_db() {
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
-            MobileLedgerDB.setDb_filename(this.getApplicationInfo().deviceProtectedDataDir + "/" + MobileLedgerDB.DATABASE_NAME);
-        }
-        else {
-            MobileLedgerDB.setDb_filename(MobileLedgerDB.DATABASE_NAME);
-        }
-        MobileLedgerDB.initDB();
-
-        account_list_last_updated = MobileLedgerDB.get_option_value("last_refresh", (long) 0);
-
-    }
-
-    private void update_accounts(boolean force) {
-        long now = new Date().getTime();
-        if ((now > (account_list_last_updated + (24 * 3600*1000))) || force) {
-            Log.d("db", "accounts last updated at " + account_list_last_updated+" and now is " + now+". re-fetching");
-            update_accounts();
-        }
-    }
-
-    private void update_accounts() {
-        Resources rm = getResources();
-
-        ProgressBar pb = findViewById(R.id.progressBar);
-        pb.setVisibility(View.VISIBLE);
-        TextView pt = findViewById(R.id.textProgress);
-        pt.setVisibility(View.VISIBLE);
-        pb.setIndeterminate(true);
-
-        RetrieveAccountsTask task = new RetrieveAccountsTask() {
-            @Override
-            protected void onProgressUpdate(Integer... values) {
-                if ( values[0] == 0 )
-                    pt.setText(R.string.progress_connecting);
-                else
-                    pt.setText(String.format(getResources().getString(R.string.progress_N_accounts_loaded), values[0]));
-            }
-
-            @Override
-            protected void onPostExecute(Void result) {
-                pb.setVisibility(GONE);
-                pt.setVisibility(GONE);
-                if (this.error != 0)
-                    Snackbar.make(drawer, rm.getString(this.error), Snackbar.LENGTH_LONG );
-                else
-                    set_option_value("last_refresh", new Date().getTime() );
-            }
-        };
-
-        task.setPref(PreferenceManager.getDefaultSharedPreferences(this));
-        task.execute(db);
-
-    }
-}
index dca8d463263623469af193670079199f072b44c6..a9d6097a163eecb78e988fbf9f97526c9be45db7 100644 (file)
@@ -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);
 
index 9e49c46f3c1d658ba6ac43c28f7495a4d7668013..7d84fe0c2e03ce972a45f7006dc05393b61b3bc7 100644 (file)
@@ -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 (file)
index 0000000..9438159
--- /dev/null
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#313131"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M17,10L7,10v2h10v-2zM19,3h-1L18,1h-2v2L8,3L8,1L6,1v2L5,3c-1.11,0 -1.99,0.9 -1.99,2L3,19c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,8h14v11zM14,14L7,14v2h7v-2z" />
+</vector>
diff --git a/app/src/main/res/layout/activity_account_summary.xml b/app/src/main/res/layout/activity_account_summary.xml
new file mode 100644 (file)
index 0000000..d5f2087
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".NewTransactionActivity">
+
+    <android.support.design.widget.AppBarLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:theme="@style/AppTheme.AppBarOverlay">
+
+        <android.support.v7.widget.Toolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"
+            android:background="?attr/colorPrimary"
+            app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+    </android.support.design.widget.AppBarLayout>
+
+    <include layout="@layout/content_new_transaction" />
+
+    <android.support.constraint.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        >
+
+        <ProgressBar
+            android:id="@+id/save_transaction_progress"
+            android:layout_width="80dp"
+            android:layout_height="80dp"
+            android:layout_margin="4dp"
+            android:indeterminate="true"
+            android:visibility="invisible"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent" />
+
+    </android.support.constraint.ConstraintLayout>
+
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_new_transaction.xml b/app/src/main/res/layout/activity_new_transaction.xml
deleted file mode 100644 (file)
index d5f2087..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".NewTransactionActivity">
-
-    <android.support.design.widget.AppBarLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:theme="@style/AppTheme.AppBarOverlay">
-
-        <android.support.v7.widget.Toolbar
-            android:id="@+id/toolbar"
-            android:layout_width="match_parent"
-            android:layout_height="?attr/actionBarSize"
-            android:background="?attr/colorPrimary"
-            app:popupTheme="@style/AppTheme.PopupOverlay" />
-
-    </android.support.design.widget.AppBarLayout>
-
-    <include layout="@layout/content_new_transaction" />
-
-    <android.support.constraint.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        >
-
-        <ProgressBar
-            android:id="@+id/save_transaction_progress"
-            android:layout_width="80dp"
-            android:layout_height="80dp"
-            android:layout_margin="4dp"
-            android:indeterminate="true"
-            android:visibility="invisible"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent" />
-
-    </android.support.constraint.ConstraintLayout>
-
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
index 45daa4e2ee5c4b75d6f2bd7cb84b24a202ee9683..05591be85f231911526653657b7756fc6a9834a2 100644 (file)
@@ -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">
 
     <android.support.design.widget.AppBarLayout
         android:layout_width="match_parent"
@@ -20,7 +20,7 @@
 
     </android.support.design.widget.AppBarLayout>
 
-    <include layout="@layout/content_latest_transactions" />
+    <include layout="@layout/content_account_summary" />
 
     <android.support.design.widget.FloatingActionButton
         android:id="@+id/btn_add_transaction"
diff --git a/app/src/main/res/layout/content_account_summary.xml b/app/src/main/res/layout/content_account_summary.xml
new file mode 100644 (file)
index 0000000..dfda28d
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    app:layout_behavior="@string/appbar_scrolling_view_behavior"
+    tools:context=".AccountSummary"
+    tools:showIn="@layout/app_bar_latest_transactions">
+
+    <TextView
+        android:id="@+id/textProgress"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="TextView"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent" />
+
+    <ProgressBar
+        android:id="@+id/progressBar"
+        style="?android:attr/progressBarStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginBottom="16dp"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@+id/textProgress"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent" />
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="325dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="40dp"
+        app:layout_constraintBottom_toTopOf="@+id/textProgress"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <ScrollView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:paddingLeft="@dimen/activity_horizontal_margin">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical">
+
+                    <ScrollView
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:paddingLeft="@dimen/activity_horizontal_margin">
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:orientation="vertical" />
+                    </ScrollView>
+                </LinearLayout>
+            </ScrollView>
+
+        </LinearLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>
\ 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 (file)
index 1eb4c38..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior"
-    tools:context=".LatestTransactions"
-    tools:showIn="@layout/app_bar_latest_transactions">
-
-    <TextView
-        android:id="@+id/textProgress"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="TextView"
-        android:visibility="gone"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
-
-    <ProgressBar
-        android:id="@+id/progressBar"
-        style="?android:attr/progressBarStyle"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginBottom="16dp"
-        android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/textProgress"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
-
-</android.support.constraint.ConstraintLayout>
\ No newline at end of file
index b4b6babedf9bc1a90e3310dba53742171682d1a0..0d284493e5b8b0cd051fd029607ecaa0c8e3a7ec 100644 (file)
@@ -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">
 
     <ScrollView
         android:id="@+id/transaction_details"
index 64ae9e5f30869b6a3e78f671575b3cd5dd5f2f33..6687d0dac9be0c4984c327297c715e762f1b758a 100644 (file)
                 android:paddingEnd="16dp">
 
                 <TextView
-                    android:id="@+id/textView4"
+                    android:id="@+id/nav_account_summary"
                     style="@style/nav_button"
                     android:drawableStart="@drawable/ic_home_black_24dp"
+                    android:text="@string/account_summary_title" />
+
+                <TextView
+                    android:id="@+id/nav_latest_transactions"
+                    style="@style/nav_button"
+                    android:drawableStart="@drawable/ic_event_note_black_24dp"
                     android:text="@string/nav_latest_transactions_title" />
 
                 <TextView
@@ -37,6 +43,7 @@
                     style="@style/nav_button"
                     android:drawableStart="@drawable/ic_assignment_black_24dp"
                     android:text="@string/nav_reports_title" />
+
             </LinearLayout>
 
         </LinearLayout>
index b6d39b1dc0891975ff240e762982166a3dea8276..ab25a3fae3f040cf94032aede645194a17be9b15 100644 (file)
@@ -24,4 +24,5 @@
     <string name="new_transaction_description_hint">Описание</string>
     <string name="progress_N_accounts_loaded">Заредени са %d сметки</string>
     <string name="action_submit_transaction_title">Запазване</string>
+    <string name="account_summary_title">Сметките накратко</string>
 </resources>
\ No newline at end of file
index 24bd8ecd2fce9cbfd29fbd134c1d22b5bf1c5abf..75e444d46195ee369c71c7fbc2beb764bc73e8da 100644 (file)
@@ -68,4 +68,5 @@
     <string name="progress_N_accounts_loaded">%d accounts loaded</string>
     <string name="new_transaction_description_hint">Description</string>
     <string name="action_submit_transaction_title">Save</string>
+    <string name="account_summary_title">Account Summary</string>
 </resources>