diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/analytics/SettingsPrivacyPreservingAnalyticsFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/analytics/SettingsPrivacyPreservingAnalyticsFragment.kt index 063b51bbff7..b3f05963645 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/analytics/SettingsPrivacyPreservingAnalyticsFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/analytics/SettingsPrivacyPreservingAnalyticsFragment.kt @@ -33,17 +33,29 @@ class SettingsPrivacyPreservingAnalyticsFragment : binding.apply { + // Privacy Preserving Analytics Switch + val updateAnalyticsSwitch = + settingsPpaSwitchRow.settingsSwitchRowSwitch + // Additional click target to toggle switch + val updateAnalyticsRow = + settingsPpaSwitchRow.settingsSwitchRow + settingsPpaHeader.headerButtonBack.buttonIcon.setOnClickListener { popBackStack() } - settingsPpaSwitchRow.settingsSwitchRowSwitch.setOnCheckedChangeListener { view, _ -> + updateAnalyticsSwitch.setOnCheckedChangeListener { view, _ -> // Make sure that listener is called by user interaction if (!view.isPressed) return@setOnCheckedChangeListener viewModel.analyticsToggleEnabled() } + // Additional click target to toggle switch + updateAnalyticsRow.setOnClickListener { + if (updateAnalyticsRow.isEnabled) viewModel.analyticsToggleEnabled() + } + federalStateRow.setOnClickListener { doNavigate( SettingsPrivacyPreservingAnalyticsFragmentDirections @@ -69,6 +81,13 @@ class SettingsPrivacyPreservingAnalyticsFragment : ) ) } + + moreInfoRow.setOnClickListener { + doNavigate( + SettingsPrivacyPreservingAnalyticsFragmentDirections + .actionSettingsPrivacyPreservingAnalyticsFragmentToPpaMoreInfoFragment() + ) + } } viewModel.ageGroup.observe2(this) { diff --git a/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_disabled.xml b/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_disabled.xml index 1263bb94a9f..d1336c55312 100644 --- a/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_disabled.xml +++ b/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_disabled.xml @@ -1,10 +1,10 @@ + android:width="40dp" + android:height="40dp" + android:viewportWidth="40" + android:viewportHeight="40"> diff --git a/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_enabled.xml b/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_enabled.xml index 382644b0ac8..42244d24fd3 100644 --- a/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_enabled.xml +++ b/Corona-Warn-App/src/main/res/drawable/ic_settings_privacy_preserving_analytics_enabled.xml @@ -1,9 +1,9 @@ + android:width="40dp" + android:height="40dp" + android:viewportWidth="40" + android:viewportHeight="40"> diff --git a/Corona-Warn-App/src/main/res/layout/fragment_settings_privacy_preserving_analytics.xml b/Corona-Warn-App/src/main/res/layout/fragment_settings_privacy_preserving_analytics.xml index 946dc53bad5..f2116be6f2d 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_settings_privacy_preserving_analytics.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_settings_privacy_preserving_analytics.xml @@ -27,7 +27,6 @@ android:id="@+id/scrollview" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginBottom="@dimen/spacing_small" app:layout_constraintBottom_toTopOf="@+id/guideline_bottom" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -41,7 +40,7 @@ android:id="@+id/onboarding_illustration" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="18dp" + android:layout_marginTop="@dimen/spacing_small" android:contentDescription="@string/onboarding_ppa_illustration_description" android:focusable="true" app:layout_constraintEnd_toEndOf="parent" @@ -55,7 +54,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/guideline_start" - android:layout_marginTop="19dp" + android:layout_marginTop="@dimen/spacing_small" android:layout_marginEnd="@dimen/guideline_end" android:contentDescription="@string/onboarding_ppa_headline" android:focusable="true" @@ -70,7 +69,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="@dimen/guideline_start" - android:layout_marginTop="35dp" + android:layout_marginTop="@dimen/spacing_medium" android:layout_marginEnd="@dimen/guideline_end" android:contentDescription="@string/onboarding_ppa_body" android:focusable="true" @@ -238,7 +237,7 @@ style="@style/cardTracing" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="42dp" + android:layout_marginTop="@dimen/spacing_large" android:orientation="vertical" app:layout_constraintEnd_toStartOf="@+id/guideline_card_end" app:layout_constraintStart_toStartOf="@+id/guideline_card_start" @@ -262,7 +261,7 @@ style="@style/body1" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="27dp" + android:layout_marginTop="@dimen/spacing_normal" android:focusable="true" android:text="@string/ppa_settings_privacy_information_body" app:layout_constraintEnd_toEndOf="parent" @@ -271,11 +270,11 @@ +