From af3bdf823ebb3f58ff4080ae862d315841d3706e Mon Sep 17 00:00:00 2001 From: Hamza Ahmed Khan Date: Tue, 8 Nov 2022 17:55:38 +0500 Subject: [PATCH 01/13] Extend Sync stats view for v5 --- gradle.properties | 2 +- opensrp-core/res/layout/fragment_stats.xml | 517 ++++++++++++++++-- opensrp-core/res/values/strings.xml | 20 + .../java/org/smartregister/AllConstants.java | 17 + .../org/smartregister/util/StatsUtils.java | 210 +++++++ .../view/contract/StatsFragmentContract.java | 4 +- .../view/fragment/StatsFragment.java | 89 ++- .../interactor/StatsFragmentInteractor.java | 125 +---- .../presenter/StatsFragmentPresenter.java | 3 +- opensrp-core/src/test/assets/app.properties | 1 + .../presenter/StatsFragmentPresenterTest.java | 2 +- .../smartregister/util/StatsUtilsTest.java | 141 +++++ .../org/smartregister/util/UtilsTest.java | 1 + .../view/fragment/StatsFragmentTest.java | 38 +- 14 files changed, 974 insertions(+), 196 deletions(-) create mode 100644 opensrp-core/src/main/java/org/smartregister/util/StatsUtils.java create mode 100644 opensrp-core/src/test/java/org/smartregister/util/StatsUtilsTest.java diff --git a/gradle.properties b/gradle.properties index 662d7758f..5cba84a33 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=5.0.8-SNAPSHOT +VERSION_NAME=5.0.9-DEV-SNAPSHOT VERSION_CODE=1 GROUP=org.smartregister POM_SETTING_DESCRIPTION=OpenSRP Client Core Application diff --git a/opensrp-core/res/layout/fragment_stats.xml b/opensrp-core/res/layout/fragment_stats.xml index f268f118e..3572d6b7e 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,428 @@ 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" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +