]> git.ktnx.net Git - mobile-ledger.git/commitdiff
"Loading..." screen while DB is being read
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 3 May 2019 15:26:11 +0000 (18:26 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 3 May 2019 16:11:44 +0000 (19:11 +0300)
not noticeable at present, because the first DB read (and possible upgrade)
is being run when the activity is created.

app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/loading.xml [new file with mode: 0644]
app/src/main/res/layout/no_profiles.xml
app/src/main/res/values-bg/strings.xml
app/src/main/res/values/strings.xml

index d9f604b81ce1eae4b92925ba5a011886c7b552f6..b047cb8a18db8e42b9c18578c7db247edff6b579 100644 (file)
             android:layout_width="match_parent"
             android:layout_height="match_parent">
 
+            <include layout="@layout/loading" />
+
             <androidx.constraintlayout.widget.ConstraintLayout
+                android:visibility="gone"
                 android:id="@+id/pager_layout"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
@@ -52,9 +55,9 @@
                     android:layout_gravity="bottom|end"
                     android:layout_margin="@dimen/fab_margin"
                     app:backgroundTint="?colorAccent"
-                    app:maxImageSize="36dp"
                     app:layout_constraintBottom_toBottomOf="parent"
                     app:layout_constraintEnd_toEndOf="parent"
+                    app:maxImageSize="36dp"
                     app:srcCompat="@drawable/ic_add_white_24dp" />
 
                 <LinearLayout
diff --git a/app/src/main/res/layout/loading.xml b/app/src/main/res/layout/loading.xml
new file mode 100644 (file)
index 0000000..23c63f6
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+  ~ Copyright © 2019 Damyan Ivanov.
+  ~ This file is part of MoLe.
+  ~ MoLe is free software: you can distribute it and/or modify it
+  ~ under the term of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ (at your opinion), any later version.
+  ~
+  ~ MoLe is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  ~ GNU General Public License terms for details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
+  -->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/loading_layout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?colorPrimary"
+    android:padding="@dimen/activity_horizontal_margin">
+
+    <TextView
+        android:id="@+id/textView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="48dp"
+        android:text="@string/text_loading"
+        android:textColor="@android:color/white"
+        android:textSize="48sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
index 7243f91169207bffacf05dea3c8e8f3162737820..f3a4d4d6defb898a765d7c5ed3fc421615c4da9d 100644 (file)
@@ -17,8 +17,8 @@
 
 <androidx.constraintlayout.widget.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:id="@+id/no_profiles_layout"
+    android:visibility="gone"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="?table_row_dark_bg"
index 8ca2c0684f4adaf991afaffc6d01764433701b6a..8b1efea065f11aa0961c1d9f882c48cf458159c3 100644 (file)
     <string name="pref_preferred_autocompletion_account_filter_hint" >Филтър при избор на предишна трансакция</string>
     <string name="remove_profile_dialog_message">Потвърдете окончателното премахване на профила</string>
     <string name="Remove">Премахване</string>
+    <string name="text_loading">Зареждане…</string>
 
 </resources>
index c2485599b57f3eb60b14823c0223bea0f475ec66..808b40b0df47cd7f690234e0af3598afe90fec64 100644 (file)
     <string name="pref_preferred_autocompletion_account_filter_hint">Filter for transaction auto-completion</string>
     <string name="remove_profile_dialog_message">Permanently remove this profile?</string>
     <string name="Remove">Remove</string>
+    <string name="text_loading">Loading…</string>
 </resources>