From 893e5e59a59eba3b6d06a5e5c2a3e6ab1db80c5e Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Tue, 8 Nov 2022 17:55:38 +0500 Subject: [PATCH 01/20] Add more info to sync stats screen --- opensrp-core/build.gradle | 3 +- opensrp-core/res/layout/fragment_stats.xml | 440 +++++++++++++++--- opensrp-core/res/values/strings.xml | 17 + .../java/org/smartregister/AllConstants.java | 13 + .../view/contract/StatsFragmentContract.java | 4 +- .../view/fragment/StatsFragment.java | 52 ++- .../interactor/StatsFragmentInteractor.java | 119 +++-- .../presenter/StatsFragmentPresenter.java | 8 +- .../presenter/StatsFragmentPresenterTest.java | 2 +- 9 files changed, 564 insertions(+), 94 deletions(-) diff --git a/opensrp-core/build.gradle b/opensrp-core/build.gradle index 01c12289b..9a1b3ad3f 100644 --- a/opensrp-core/build.gradle +++ b/opensrp-core/build.gradle @@ -92,7 +92,8 @@ android { buildConfigField "int", "DB_ENCRYPTION_VERSION", '1' buildConfigField("int", "VERSION_CODE", "${defaultConfig.versionCode}") buildConfigField("String", "VERSION_NAME", "\"${defaultConfig.versionName}\"") - } + buildConfigField "int", "DATABASE_VERSION", '1' + } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' diff --git a/opensrp-core/res/layout/fragment_stats.xml b/opensrp-core/res/layout/fragment_stats.xml index f268f118e..d0d46cdc7 100644 --- a/opensrp-core/res/layout/fragment_stats.xml +++ b/opensrp-core/res/layout/fragment_stats.xml @@ -1,22 +1,33 @@ - + android:layout_height="match_parent" + android:fillViewport="true"> + + @@ -25,17 +36,18 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:textSize="15sp" - android:textStyle="bold" - android:text="@string/synced_events"/> + android:text="@string/synced_events" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> @@ -46,21 +58,22 @@ android:weightSum="2"> + android:text="@string/unsynced_events" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> @@ -71,47 +84,49 @@ android:weightSum="2"> + android:text="@string/task_unprocessed_events" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="@string/synced_clients" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> @@ -122,47 +137,49 @@ android:weightSum="2"> + android:text="@string/unsynced_clients" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="@string/validated_events" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> @@ -173,34 +190,351 @@ android:weightSum="2"> + android:text="@string/validated_clients" + android:textColor="@color/text_black" + android:textSize="18sp" /> + android:text="" + android:textColor="@color/text_black" + android:textSize="18sp" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +