From 7b45f41756cd83625439de6748c4555ce9e603a2 Mon Sep 17 00:00:00 2001 From: Mohamed Metwalli Date: Thu, 6 Jan 2022 14:57:30 +0100 Subject: [PATCH 1/8] Display persons count int test menu (#4659) Co-authored-by: BMItr --- .../test/menu/ui/TestMenuFragment.kt | 6 ++++++ .../test/menu/ui/TestMenuFragmentViewModel.kt | 8 +++++++- .../res/layout/fragment_test_menu.xml | 15 ++++++++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragment.kt b/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragment.kt index 9e859a8926e..3b21003f985 100644 --- a/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragment.kt +++ b/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragment.kt @@ -1,5 +1,6 @@ package de.rki.coronawarnapp.test.menu.ui +import android.annotation.SuppressLint import android.os.Bundle import android.view.View import androidx.fragment.app.Fragment @@ -23,6 +24,7 @@ class TestMenuFragment : Fragment(R.layout.fragment_test_menu), AutoInject { @Inject lateinit var menuAdapter: TestMenuAdapter + @SuppressLint("SetTextI18n") override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) @@ -37,5 +39,9 @@ class TestMenuFragment : Fragment(R.layout.fragment_test_menu), AutoInject { vm.showTestScreenEvent.observe2(this) { findNavController().navigate(it.targetId) } + + vm.personsCount.observe2(this) { + binding.personsCount.text = "Persons count: $it" + } } } diff --git a/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragmentViewModel.kt b/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragmentViewModel.kt index 7335267b418..7db8015ddda 100644 --- a/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragmentViewModel.kt +++ b/Corona-Warn-App/src/deviceForTesters/java/de/rki/coronawarnapp/test/menu/ui/TestMenuFragmentViewModel.kt @@ -3,6 +3,7 @@ package de.rki.coronawarnapp.test.menu.ui import androidx.lifecycle.MutableLiveData import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject +import de.rki.coronawarnapp.covidcertificate.person.core.PersonCertificatesProvider import de.rki.coronawarnapp.miscinfo.MiscInfoFragment import de.rki.coronawarnapp.test.appconfig.ui.AppConfigTestFragment import de.rki.coronawarnapp.test.booster.ui.BoosterTestFragment @@ -24,8 +25,13 @@ import de.rki.coronawarnapp.test.tasks.ui.TestTaskControllerFragment import de.rki.coronawarnapp.util.ui.SingleLiveEvent import de.rki.coronawarnapp.util.viewmodel.CWAViewModel import de.rki.coronawarnapp.util.viewmodel.SimpleCWAViewModelFactory +import kotlinx.coroutines.flow.map -class TestMenuFragmentViewModel @AssistedInject constructor() : CWAViewModel() { +class TestMenuFragmentViewModel @AssistedInject constructor( + personCertificatesProvider: PersonCertificatesProvider +) : CWAViewModel() { + + val personsCount = personCertificatesProvider.personCertificates.map { it.size }.asLiveData2() val testMenuData by lazy { listOf( diff --git a/Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_menu.xml b/Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_menu.xml index 4e8e908b151..dfc680ec91c 100644 --- a/Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_menu.xml +++ b/Corona-Warn-App/src/deviceForTesters/res/layout/fragment_test_menu.xml @@ -1,6 +1,7 @@ @@ -16,6 +17,18 @@ app:subtitle="For testers & QA <3" app:title="Test Menu" /> + + + app:layout_constraintTop_toBottomOf="@+id/persons_count" /> From f01ea25761cc235b2a44f60100ba9f1eaebb6691 Mon Sep 17 00:00:00 2001 From: SamuraiKek Date: Fri, 7 Jan 2022 12:59:56 +0200 Subject: [PATCH 2/8] Added statistics card. --- ...s_cards_vaccinated_with_booster_layout.xml | 115 +++ .../rki/coronawarnapp/statistics/StatsItem.kt | 43 +- .../statistics/source/StatisticsParser.kt | 5 + .../ui/homecards/StatisticsCardAdapter.kt | 6 + .../cards/PersonsVaccinatedWithBoosterCard.kt | 77 ++ .../util/formatter/FormatterStatistics.kt | 4 +- .../ic_vaccinated_completely.xml | 665 +++++++++--------- .../res/drawable-night/ic_vaccinated_once.xml | 161 ++--- .../ic_vaccinated_with_booster.xml | 370 ++++++++++ .../res/drawable/ic_vaccinated_completely.xml | 663 +++++++++-------- .../main/res/drawable/ic_vaccinated_once.xml | 175 ++--- .../drawable/ic_vaccinated_with_booster.xml | 370 ++++++++++ .../src/main/res/values-de/strings.xml | 4 + .../src/main/res/values/strings.xml | 4 + 14 files changed, 1821 insertions(+), 841 deletions(-) create mode 100644 Corona-Warn-App/src/debug/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml create mode 100644 Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/PersonsVaccinatedWithBoosterCard.kt create mode 100644 Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_with_booster.xml create mode 100644 Corona-Warn-App/src/main/res/drawable/ic_vaccinated_with_booster.xml diff --git a/Corona-Warn-App/src/debug/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml b/Corona-Warn-App/src/debug/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml new file mode 100644 index 00000000000..b3101e052d5 --- /dev/null +++ b/Corona-Warn-App/src/debug/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt index c8010da0349..675d55c7a82 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt @@ -13,13 +13,13 @@ data class StatisticsData( override fun toString(): String { return "StatisticsData(cards=${ - items.map { - when (it) { - is AddStatsItem -> "AddCard(${it.isEnabled})" - is GlobalStatsItem -> it.cardType.name + " " + it.updatedAt - is LocalStatsItem -> it.cardType.name + " " + it.updatedAt + items.map { + when (it) { + is AddStatsItem -> "AddCard(${it.isEnabled})" + is GlobalStatsItem -> it.cardType.name + " " + it.updatedAt + is LocalStatsItem -> it.cardType.name + " " + it.updatedAt + } } - } })" } } @@ -31,9 +31,9 @@ data class LocalStatisticsData( override fun toString(): String { return "StatisticsData(cards=${ - items.map { - it.cardType.name + " " + it.updatedAt - } + items.map { + it.cardType.name + " " + it.updatedAt + } })" } } @@ -59,7 +59,8 @@ sealed class GlobalStatsItem(val cardType: Type) : GenericStatsItem() { PERSONS_VACCINATED_COMPLETELY(6), APPLIED_VACCINATION_RATES(7), OCCUPIED_INTENSIVE_CARE_BEDS(9), - INCIDENCE_AND_HOSPITALIZATION(10) + INCIDENCE_AND_HOSPITALIZATION(10), + PERSONS_VACCINATED_WITH_BOOSTER(11) } abstract fun requireValidity() @@ -238,6 +239,28 @@ data class PersonsVaccinatedCompletelyStats( } } +data class PersonsVaccinatedWithBoosterStats( + override val updatedAt: Instant, + override val keyFigures: List +) : GlobalStatsItem(cardType = Type.PERSONS_VACCINATED_WITH_BOOSTER) { + + val boosterDoses: KeyFigure + get() = keyFigures.single { it.rank == KeyFigure.Rank.PRIMARY } + + val total: KeyFigure + get() = keyFigures.single { it.rank == KeyFigure.Rank.TERTIARY } + + override fun requireValidity() { + require(keyFigures.size == 2) + requireNotNull(keyFigures.singleOrNull { it.rank == KeyFigure.Rank.PRIMARY }) { + Timber.w("PersonsVaccinatesWithBoostersStats is missing primary value") + } + requireNotNull(keyFigures.singleOrNull { it.rank == KeyFigure.Rank.TERTIARY }) { + Timber.w("PersonsVaccinatedWithBoosterStats is missing tertiary value") + } + } +} + data class AppliedVaccinationRatesStats( override val updatedAt: Instant, override val keyFigures: List diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/source/StatisticsParser.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/source/StatisticsParser.kt index 25216a22937..a6624533852 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/source/StatisticsParser.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/source/StatisticsParser.kt @@ -10,6 +10,7 @@ import de.rki.coronawarnapp.statistics.KeySubmissionsStats import de.rki.coronawarnapp.statistics.OccupiedIntensiveCareStats import de.rki.coronawarnapp.statistics.PersonsVaccinatedCompletelyStats import de.rki.coronawarnapp.statistics.PersonsVaccinatedOnceStats +import de.rki.coronawarnapp.statistics.PersonsVaccinatedWithBoosterStats import de.rki.coronawarnapp.statistics.SevenDayRValue import de.rki.coronawarnapp.statistics.StatisticsData import org.joda.time.Instant @@ -64,6 +65,10 @@ class StatisticsParser @Inject constructor() { updatedAt = updatedAt, keyFigures = keyFigures ) + GlobalStatsItem.Type.PERSONS_VACCINATED_WITH_BOOSTER -> PersonsVaccinatedWithBoosterStats( + updatedAt = updatedAt, + keyFigures = keyFigures + ) null -> null.also { Timber.tag(TAG).e("Unknown statistics type: %s", rawCard) } }.also { Timber.tag(TAG).v("Parsed %s", it.toString().replace("\n", ", ")) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/StatisticsCardAdapter.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/StatisticsCardAdapter.kt index d5faa9c0900..830a8a7db7b 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/StatisticsCardAdapter.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/StatisticsCardAdapter.kt @@ -10,6 +10,7 @@ import de.rki.coronawarnapp.statistics.KeySubmissionsStats import de.rki.coronawarnapp.statistics.OccupiedIntensiveCareStats import de.rki.coronawarnapp.statistics.PersonsVaccinatedCompletelyStats import de.rki.coronawarnapp.statistics.PersonsVaccinatedOnceStats +import de.rki.coronawarnapp.statistics.PersonsVaccinatedWithBoosterStats import de.rki.coronawarnapp.statistics.SevenDayRValue import de.rki.coronawarnapp.statistics.ui.homecards.StatisticsCardAdapter.ItemVH import de.rki.coronawarnapp.statistics.ui.homecards.cards.AddCard @@ -24,6 +25,7 @@ import de.rki.coronawarnapp.statistics.ui.homecards.cards.LocalStatisticsCardIte import de.rki.coronawarnapp.statistics.ui.homecards.cards.OccupiedIntensiveCareCard import de.rki.coronawarnapp.statistics.ui.homecards.cards.PersonsVaccinatedCompletelyCard import de.rki.coronawarnapp.statistics.ui.homecards.cards.PersonsVaccinatedOnceCard +import de.rki.coronawarnapp.statistics.ui.homecards.cards.PersonsVaccinatedWithBoosterCard import de.rki.coronawarnapp.statistics.ui.homecards.cards.SevenDayRValueCard import de.rki.coronawarnapp.statistics.ui.homecards.cards.StatisticsCardItem import de.rki.coronawarnapp.util.lists.BindableVH @@ -76,6 +78,10 @@ class StatisticsCardAdapter : val item = data[it] item is GlobalStatisticsCardItem && item.stats is PersonsVaccinatedCompletelyStats }) { PersonsVaccinatedCompletelyCard(it) }, + TypedVHCreatorMod({ + val item = data[it] + item is GlobalStatisticsCardItem && item.stats is PersonsVaccinatedWithBoosterStats + }) { PersonsVaccinatedWithBoosterCard(it) }, TypedVHCreatorMod({ val item = data[it] item is GlobalStatisticsCardItem && item.stats is AppliedVaccinationRatesStats diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/PersonsVaccinatedWithBoosterCard.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/PersonsVaccinatedWithBoosterCard.kt new file mode 100644 index 00000000000..37d347be2c6 --- /dev/null +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/ui/homecards/cards/PersonsVaccinatedWithBoosterCard.kt @@ -0,0 +1,77 @@ +package de.rki.coronawarnapp.statistics.ui.homecards.cards + +import android.view.ViewGroup +import androidx.core.os.ConfigurationCompat +import de.rki.coronawarnapp.R +import de.rki.coronawarnapp.databinding.HomeStatisticsCardsVaccinatedWithBoosterLayoutBinding +import de.rki.coronawarnapp.server.protocols.internal.stats.KeyFigureCardOuterClass +import de.rki.coronawarnapp.statistics.GlobalStatsItem +import de.rki.coronawarnapp.statistics.PersonsVaccinatedWithBoosterStats +import de.rki.coronawarnapp.statistics.ui.homecards.StatisticsCardAdapter +import de.rki.coronawarnapp.statistics.util.formatPercentageValue +import de.rki.coronawarnapp.statistics.util.formatStatisticalValue +import de.rki.coronawarnapp.util.StringBuilderExtension.appendWithLineBreak +import de.rki.coronawarnapp.util.StringBuilderExtension.appendWithTrailingSpace +import de.rki.coronawarnapp.util.formatter.getPrimaryLabel + +class PersonsVaccinatedWithBoosterCard(parent: ViewGroup) : + StatisticsCardAdapter.ItemVH( + R.layout.home_statistics_cards_basecard_layout, + parent + ) { + override val viewBinding = lazy { + HomeStatisticsCardsVaccinatedWithBoosterLayoutBinding.inflate( + layoutInflater, + itemView.findViewById(R.id.card_container), + true + ) + } + + private val currentSelectedLocale = ConfigurationCompat.getLocales(resources.configuration).get(0) + + override val onBindData: HomeStatisticsCardsVaccinatedWithBoosterLayoutBinding.( + item: GlobalStatisticsCardItem, + payloads: List + ) -> Unit = { orig, payloads -> + val item = payloads.filterIsInstance().firstOrNull() ?: orig + + infoStatistics.setOnClickListener { + item.onClickListener(item.stats) + } + + with(item.stats as PersonsVaccinatedWithBoosterStats) { + personsVaccinatedWithBoosterContainer.contentDescription = + buildAccessibilityStringForPersonsVaccinatedWithBoosterCard(item.stats, boosterDoses, total) + + primaryLabel.text = getPrimaryLabel(context) + primaryValue.text = formatPercentageValue(boosterDoses.value, currentSelectedLocale) + primaryValue.contentDescription = StringBuilder() + .appendWithTrailingSpace(getPrimaryLabel(context)) + .appendWithTrailingSpace(formatPercentageValue(boosterDoses.value, currentSelectedLocale)) + .append(context.getString(R.string.statistics_vaccinated_with_booster_card_title)) + + secondaryValue.text = formatStatisticalValue(context, total.value, total.decimals) + secondaryValue.contentDescription = StringBuilder() + .appendWithTrailingSpace(context.getString(R.string.statistics_card_infections_tertiary_label)) + .appendWithTrailingSpace(formatStatisticalValue(context, total.value, total.decimals)) + .append(context.getString(R.string.statistics_vaccinated_with_booster_card_title)) + } + } + + private fun buildAccessibilityStringForPersonsVaccinatedWithBoosterCard( + item: GlobalStatsItem, + firstDose: KeyFigureCardOuterClass.KeyFigure, + total: KeyFigureCardOuterClass.KeyFigure + ): StringBuilder { + + return StringBuilder() + .appendWithTrailingSpace(context.getString(R.string.accessibility_statistics_card_announcement)) + .appendWithLineBreak(context.getString(R.string.statistics_vaccinated_with_booster_card_title)) + .appendWithLineBreak(context.getString(R.string.statistics_nationwide_text)) + .appendWithTrailingSpace(item.getPrimaryLabel(context)) + .appendWithLineBreak(formatPercentageValue(firstDose.value, currentSelectedLocale)) + .appendWithTrailingSpace(context.getString(R.string.statistics_card_infections_tertiary_label)) + .appendWithTrailingSpace(formatStatisticalValue(context, total.value, total.decimals)) + .append(context.getString(R.string.accessibility_statistics_card_navigation_information)) + } +} diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/formatter/FormatterStatistics.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/formatter/FormatterStatistics.kt index fbca18aac48..f00ceb55465 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/formatter/FormatterStatistics.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/formatter/FormatterStatistics.kt @@ -14,6 +14,7 @@ import de.rki.coronawarnapp.statistics.LocalStatsItem import de.rki.coronawarnapp.statistics.OccupiedIntensiveCareStats import de.rki.coronawarnapp.statistics.PersonsVaccinatedCompletelyStats import de.rki.coronawarnapp.statistics.PersonsVaccinatedOnceStats +import de.rki.coronawarnapp.statistics.PersonsVaccinatedWithBoosterStats import de.rki.coronawarnapp.statistics.SevenDayRValue import de.rki.coronawarnapp.statistics.local.storage.SelectedStatisticsLocation import de.rki.coronawarnapp.util.TimeAndDateExtensions.toUserTimeZone @@ -38,7 +39,8 @@ fun GlobalStatsItem.getPrimaryLabel(context: Context): String { } is PersonsVaccinatedOnceStats, is IncidenceAndHospitalizationStats, - is PersonsVaccinatedCompletelyStats -> when (updatedAtDate) { + is PersonsVaccinatedCompletelyStats, + is PersonsVaccinatedWithBoosterStats -> when (updatedAtDate) { today -> context.getString(R.string.statistics_primary_value_until_today) yesterday -> context.getString(R.string.statistics_primary_value_until_yesterday) else -> context.getString(R.string.statistics_primary_value_until, dateTimeFormatter.print(updatedAtDate)) diff --git a/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_completely.xml b/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_completely.xml index 6727c8dce86..cefa155ed33 100644 --- a/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_completely.xml +++ b/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_completely.xml @@ -3,363 +3,362 @@ android:height="137dp" android:viewportWidth="90" android:viewportHeight="137"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:pathData="M28.351,68.994C27.991,68.755 27.631,68.409 27.297,67.956L21.845,60.422C21.408,59.81 21.202,59.171 21.202,58.532C21.202,57.84 21.408,57.228 21.845,56.749C22.257,56.27 22.797,56.003 23.388,56.003C23.748,56.003 24.083,56.083 24.391,56.27C24.7,56.456 24.983,56.749 25.265,57.121L29.483,63.218L38.662,46.526C39.202,45.568 39.845,45.089 40.617,45.089C41.208,45.089 41.722,45.302 42.185,45.754C42.648,46.207 42.88,46.766 42.88,47.431C42.88,47.751 42.828,48.07 42.7,48.39C42.571,48.709 42.443,49.002 42.288,49.321L31.745,67.956C31.205,68.914 30.485,69.367 29.585,69.367C29.122,69.34 28.737,69.234 28.351,68.994Z" + android:fillColor="#2D2D2F"/> + diff --git a/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_once.xml b/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_once.xml index e2eab868d2b..33d493075cd 100644 --- a/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_once.xml +++ b/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_once.xml @@ -4,37 +4,37 @@ android:viewportWidth="90" android:viewportHeight="136"> + android:pathData="M45.505,38.276C44.895,38.355 44.43,39.172 44.459,40.146L44.749,69.207C44.807,73.659 46.29,77.796 48.673,80.114C52.537,83.855 57.449,87.807 58.437,88.65C58.582,88.756 58.727,88.756 58.873,88.65C59.861,87.807 63.348,83.776 67.126,79.982C69.48,77.638 70.874,73.475 70.816,69.022L70.526,39.962C70.526,38.987 70.032,38.197 69.451,38.118C64.452,37.564 60.122,33.507 58.553,32.005C58.408,31.847 58.233,31.795 58.059,31.795C57.885,31.795 57.71,31.874 57.565,32.032C56.083,33.507 50.503,37.644 45.505,38.276Z" + android:fillColor="#2D2D2F"/> + diff --git a/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_with_booster.xml b/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_with_booster.xml new file mode 100644 index 00000000000..34962ebff92 --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable-night/ic_vaccinated_with_booster.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_completely.xml b/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_completely.xml index 1f0bb6bf40e..4f71ec1e7e7 100644 --- a/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_completely.xml +++ b/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_completely.xml @@ -3,363 +3,362 @@ android:height="137dp" android:viewportWidth="90" android:viewportHeight="137"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_once.xml b/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_once.xml index bc9ffec7af4..aeed2a3f687 100644 --- a/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_once.xml +++ b/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_once.xml @@ -4,73 +4,73 @@ android:viewportWidth="90" android:viewportHeight="136"> + diff --git a/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_with_booster.xml b/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_with_booster.xml new file mode 100644 index 00000000000..86ae40007f4 --- /dev/null +++ b/Corona-Warn-App/src/main/res/drawable/ic_vaccinated_with_booster.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corona-Warn-App/src/main/res/values-de/strings.xml b/Corona-Warn-App/src/main/res/values-de/strings.xml index 701d4e5e36b..dc1e12e2719 100644 --- a/Corona-Warn-App/src/main/res/values-de/strings.xml +++ b/Corona-Warn-App/src/main/res/values-de/strings.xml @@ -1567,6 +1567,10 @@ Sollten Sie den Test in der App gelöscht haben, können Sie ihn aus dem Papierk "Vollständig geimpfte Personen" + + + "Personen mit Auffrischimpfung" + "Verabreichte Impfdosen" diff --git a/Corona-Warn-App/src/main/res/values/strings.xml b/Corona-Warn-App/src/main/res/values/strings.xml index 51d2165a836..2e3bd7e3661 100644 --- a/Corona-Warn-App/src/main/res/values/strings.xml +++ b/Corona-Warn-App/src/main/res/values/strings.xml @@ -1565,6 +1565,10 @@ "People Who Are Fully Vaccinated" + + + "Personen mit Auffrischimpfung" + "Vaccine Doses Administered" From d8fbb3194f985c2a992dba785d76a1bf2bb4a21d Mon Sep 17 00:00:00 2001 From: SamuraiKek Date: Tue, 11 Jan 2022 14:43:44 +0200 Subject: [PATCH 3/8] Ktlin complaining although text format arranges it this way. --- .../rki/coronawarnapp/statistics/StatsItem.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt index 675d55c7a82..40b00c47930 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt @@ -13,13 +13,13 @@ data class StatisticsData( override fun toString(): String { return "StatisticsData(cards=${ - items.map { - when (it) { - is AddStatsItem -> "AddCard(${it.isEnabled})" - is GlobalStatsItem -> it.cardType.name + " " + it.updatedAt - is LocalStatsItem -> it.cardType.name + " " + it.updatedAt - } + items.map { + when (it) { + is AddStatsItem -> "AddCard(${it.isEnabled})" + is GlobalStatsItem -> it.cardType.name + " " + it.updatedAt + is LocalStatsItem -> it.cardType.name + " " + it.updatedAt } + } })" } } @@ -31,9 +31,9 @@ data class LocalStatisticsData( override fun toString(): String { return "StatisticsData(cards=${ - items.map { - it.cardType.name + " " + it.updatedAt - } + items.map { + it.cardType.name + " " + it.updatedAt + } })" } } From 298803999475ee59bd229ead8d749ad98cc2b1d1 Mon Sep 17 00:00:00 2001 From: SamuraiKek Date: Tue, 11 Jan 2022 14:48:52 +0200 Subject: [PATCH 4/8] More lint complaints. --- .../main/java/de/rki/coronawarnapp/statistics/StatsItem.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt index 40b00c47930..b72a4fbff9e 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt @@ -13,7 +13,7 @@ data class StatisticsData( override fun toString(): String { return "StatisticsData(cards=${ - items.map { + items.map { when (it) { is AddStatsItem -> "AddCard(${it.isEnabled})" is GlobalStatsItem -> it.cardType.name + " " + it.updatedAt @@ -31,7 +31,7 @@ data class LocalStatisticsData( override fun toString(): String { return "StatisticsData(cards=${ - items.map { + items.map { it.cardType.name + " " + it.updatedAt } })" From c3aabb710f7eb11abd60b6a7af11dc98cfd81aaf Mon Sep 17 00:00:00 2001 From: SamuraiKek Date: Tue, 11 Jan 2022 14:56:10 +0200 Subject: [PATCH 5/8] Changed layout location. --- .../home_statistics_cards_vaccinated_with_booster_layout.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Corona-Warn-App/src/{debug => main}/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml (100%) diff --git a/Corona-Warn-App/src/debug/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml b/Corona-Warn-App/src/main/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml similarity index 100% rename from Corona-Warn-App/src/debug/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml rename to Corona-Warn-App/src/main/res/layout/home_statistics_cards_vaccinated_with_booster_layout.xml From 28829ba4618b9c1e22f0d177fdab08e8aa37ec7c Mon Sep 17 00:00:00 2001 From: SamuraiKek Date: Tue, 11 Jan 2022 15:34:52 +0200 Subject: [PATCH 6/8] Updated info screen text. --- .../fragment_statistics_explanation.xml | 22 +++++++++++++++++++ .../src/main/res/values-de/strings.xml | 4 ++++ .../src/main/res/values/strings.xml | 4 ++++ 3 files changed, 30 insertions(+) diff --git a/Corona-Warn-App/src/main/res/layout/fragment_statistics_explanation.xml b/Corona-Warn-App/src/main/res/layout/fragment_statistics_explanation.xml index 20e4d899473..7c0766eddf7 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_statistics_explanation.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_statistics_explanation.xml @@ -355,6 +355,28 @@ android:focusable="true" android:text="@string/statistics_fully_vaccinated_people_text" /> + + + + "Vollständig geimpfte Personen" "Anzahl der an das RKI übermittelten Personen, die alle notwendigen Impfdosen erhalten haben." + + "Personen mit Auffrischimpfung" + + "Anzahl der an das RKI übermittelten Personen, die eine Auffrischimpfung erhalten haben." "Mindestens einmal geimpfte Personen" diff --git a/Corona-Warn-App/src/main/res/values/strings.xml b/Corona-Warn-App/src/main/res/values/strings.xml index 7a85b778e45..36c1f38d53b 100644 --- a/Corona-Warn-App/src/main/res/values/strings.xml +++ b/Corona-Warn-App/src/main/res/values/strings.xml @@ -1610,6 +1610,10 @@ "People who are fully vaccinated" "Number of persons reported to the RKI who have received all the necessary vaccine doses." + + "Personen mit Auffrischimpfung" + + "Anzahl der an das RKI übermittelten Personen, die eine Auffrischimpfung erhalten haben." "People who have received at least one vaccine dose" From 13830ae54fc420a90769ab54aaf65c26b5d451fa Mon Sep 17 00:00:00 2001 From: Alex Paulescu Date: Thu, 13 Jan 2022 11:59:28 +0200 Subject: [PATCH 7/8] Update StatsItem.kt --- .../src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt index b72a4fbff9e..c70f70c7be3 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/statistics/StatsItem.kt @@ -253,7 +253,7 @@ data class PersonsVaccinatedWithBoosterStats( override fun requireValidity() { require(keyFigures.size == 2) requireNotNull(keyFigures.singleOrNull { it.rank == KeyFigure.Rank.PRIMARY }) { - Timber.w("PersonsVaccinatesWithBoostersStats is missing primary value") + Timber.w("PersonsVaccinatedWithBoostersStats is missing primary value") } requireNotNull(keyFigures.singleOrNull { it.rank == KeyFigure.Rank.TERTIARY }) { Timber.w("PersonsVaccinatedWithBoosterStats is missing tertiary value") From f5536f3616d4d660f291f077d8c263cea0b99564 Mon Sep 17 00:00:00 2001 From: SamuraiKek Date: Thu, 13 Jan 2022 13:51:29 +0200 Subject: [PATCH 8/8] Updated info screen with new strings from iOS. --- Corona-Warn-App/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Corona-Warn-App/src/main/res/values-de/strings.xml b/Corona-Warn-App/src/main/res/values-de/strings.xml index 1468d127c1c..ed16e2984b5 100644 --- a/Corona-Warn-App/src/main/res/values-de/strings.xml +++ b/Corona-Warn-App/src/main/res/values-de/strings.xml @@ -1589,7 +1589,7 @@ Sollten Sie den Test in der App gelöscht haben, können Sie ihn aus dem Papierk "Vollständig geimpfte Personen" - "Anzahl der an das RKI übermittelten Personen, die alle notwendigen Impfdosen erhalten haben." + "Anzahl der an das RKI übermittelten Personen, die alle notwendigen Impfdosen der Grundimmunisierung erhalten haben." "Personen mit Auffrischimpfung"