From a1a3c673d91cb4db9697bdb5971f749b82a8fabf Mon Sep 17 00:00:00 2001 From: marcmuschko <marc.muschko@sap.com> Date: Thu, 4 Jun 2020 12:37:51 +0200 Subject: [PATCH] Feature/header layout (#159) * onboarding action buttons alignment * adjusted header layout in main overview * main share header adjusted * fixed scroll view issue and added sticky header in settings main screen and settings tracing * settings notification header adjusted * settings reset header footer adjustment * risk details footer adjusted * fix build issues * information header adjustment * information section headers adjusted --- .../information/InformationAboutFragment.kt | 2 +- .../information/InformationContactFragment.kt | 2 +- .../ui/information/InformationFragment.kt | 2 +- .../information/InformationLegalFragment.kt | 2 +- .../information/InformationPrivacyFragment.kt | 2 +- .../InformationTechnicalFragment.kt | 2 +- .../information/InformationTermsFragment.kt | 2 +- .../ui/main/MainOverviewFragment.kt | 2 +- .../ui/main/MainShareFragment.kt | 2 +- .../ui/settings/SettingsFragment.kt | 2 +- .../settings/SettingsNotificationFragment.kt | 2 +- .../ui/settings/SettingsResetFragment.kt | 8 +- .../ui/settings/SettingsTracingFragment.kt | 2 +- .../main/res/layout/fragment_information.xml | 249 ++++++----- .../res/layout/fragment_information_about.xml | 142 +++--- .../layout/fragment_information_contact.xml | 211 +++++---- .../res/layout/fragment_information_legal.xml | 148 ++++--- .../layout/fragment_information_privacy.xml | 149 ++++--- .../layout/fragment_information_technical.xml | 148 ++++--- .../res/layout/fragment_information_terms.xml | 148 ++++--- .../res/layout/fragment_main_overview.xml | 412 ++++++++++-------- .../main/res/layout/fragment_main_share.xml | 142 +++--- .../main/res/layout/fragment_onboarding.xml | 8 +- .../fragment_onboarding_notifications.xml | 8 +- .../layout/fragment_onboarding_privacy.xml | 8 +- .../res/layout/fragment_onboarding_test.xml | 8 +- .../layout/fragment_onboarding_tracing.xml | 14 +- .../main/res/layout/fragment_risk_details.xml | 343 ++++++++------- .../src/main/res/layout/fragment_settings.xml | 202 +++++---- .../fragment_settings_notifications.xml | 203 +++++---- .../res/layout/fragment_settings_reset.xml | 214 ++++----- .../res/layout/fragment_settings_tracing.xml | 257 ++++++----- 32 files changed, 1640 insertions(+), 1406 deletions(-) diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationAboutFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationAboutFragment.kt index 09308fcbc..710769285 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationAboutFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationAboutFragment.kt @@ -32,7 +32,7 @@ class InformationAboutFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.informationAboutHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationAboutHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationContactFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationContactFragment.kt index e05286d77..3f0c11ba0 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationContactFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationContactFragment.kt @@ -34,7 +34,7 @@ class InformationContactFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.informationContactHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationContactHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } binding.informationContactNavigationRowPhone.navigationRow.setOnClickListener { diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationFragment.kt index 34a1994eb..befc5d4ef 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationFragment.kt @@ -67,7 +67,7 @@ class InformationFragment : BaseFragment() { InformationFragmentDirections.actionInformationFragmentToInformationTechnicalFragment() ) } - binding.informationHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationLegalFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationLegalFragment.kt index c8e749ae3..2d32a639d 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationLegalFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationLegalFragment.kt @@ -32,7 +32,7 @@ class InformationLegalFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.informationLegalHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationLegalHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationPrivacyFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationPrivacyFragment.kt index 79fc00d18..7b3cc61e4 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationPrivacyFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationPrivacyFragment.kt @@ -32,7 +32,7 @@ class InformationPrivacyFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.informationPrivacyHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationPrivacyHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTechnicalFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTechnicalFragment.kt index a240ada4f..a4e295f7e 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTechnicalFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTechnicalFragment.kt @@ -32,7 +32,7 @@ class InformationTechnicalFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.informationTechnicalHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationTechnicalHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTermsFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTermsFragment.kt index 8581c18ea..486172f2a 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTermsFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/information/InformationTermsFragment.kt @@ -32,7 +32,7 @@ class InformationTermsFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.informationTermsHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.informationTermsHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainOverviewFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainOverviewFragment.kt index 5a007838f..03d4f3929 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainOverviewFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainOverviewFragment.kt @@ -37,7 +37,7 @@ class MainOverviewFragment : BaseFragment() { } private fun setButtonOnClickListener() { - binding.mainOverviewHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.mainOverviewHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainShareFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainShareFragment.kt index 9bff3a7ad..e6b42e0ea 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainShareFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/main/MainShareFragment.kt @@ -45,7 +45,7 @@ class MainShareFragment : BaseFragment() { binding.mainShareButton.setOnClickListener { ShareHelper.shareText(this, getString(R.string.main_share_message), null) } - binding.mainShareHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.mainShareHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsFragment.kt index 0e36914cd..ed39f3716 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsFragment.kt @@ -59,7 +59,7 @@ class SettingsFragment : BaseFragment() { val tracingRow = binding.settingsTracing.settingsRow val notificationRow = binding.settingsNotifications.settingsRow val resetRow = binding.settingsReset - val goBack = binding.settingsHeader.informationHeader.headerButtonBack.buttonIcon + val goBack = binding.settingsHeader.headerButtonBack.buttonIcon resetRow.setOnClickListener { doNavigate( SettingsFragmentDirections.actionSettingsFragmentToSettingsResetFragment() diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsNotificationFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsNotificationFragment.kt index 7e335ef7c..695362b30 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsNotificationFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsNotificationFragment.kt @@ -62,7 +62,7 @@ class SettingsNotificationFragment : Fragment() { // Settings val settingsRow = binding.settingsNavigationRowSystem.navigationRow val goBack = - binding.settingsDetailsHeaderNotifications.informationHeader.headerButtonBack.buttonIcon + binding.settingsNotificationsHeader.headerButtonBack.buttonIcon // Update Risk updateRiskNotificationSwitch.setOnCheckedChangeListener { _, _ -> // android calls this listener also on start, so it has to be verified if the user pressed the switch diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsResetFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsResetFragment.kt index 9975bdcdd..0606f7819 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsResetFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsResetFragment.kt @@ -6,7 +6,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Toast -import androidx.fragment.app.activityViewModels import androidx.lifecycle.lifecycleScope import com.google.android.gms.common.api.ApiException import de.rki.coronawarnapp.databinding.FragmentSettingsResetBinding @@ -16,7 +15,6 @@ import de.rki.coronawarnapp.nearby.InternalExposureNotificationClient import de.rki.coronawarnapp.ui.BaseFragment import de.rki.coronawarnapp.ui.main.MainActivity import de.rki.coronawarnapp.ui.onboarding.OnboardingActivity -import de.rki.coronawarnapp.ui.viewmodel.TracingViewModel import de.rki.coronawarnapp.util.DataRetentionHelper import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -25,7 +23,6 @@ import kotlinx.coroutines.withContext /** * The user is informed what a reset means and he can perform it. * - * @see TracingViewModel */ class SettingsResetFragment : BaseFragment() { @@ -33,7 +30,6 @@ class SettingsResetFragment : BaseFragment() { private val TAG: String? = SettingsResetFragment::class.simpleName } - private val tracingViewModel: TracingViewModel by activityViewModels() private lateinit var binding: FragmentSettingsResetBinding override fun onCreateView( @@ -42,8 +38,6 @@ class SettingsResetFragment : BaseFragment() { savedInstanceState: Bundle? ): View? { binding = FragmentSettingsResetBinding.inflate(inflater) - binding.tracingViewModel = tracingViewModel - binding.lifecycleOwner = this return binding.root } @@ -55,7 +49,7 @@ class SettingsResetFragment : BaseFragment() { binding.settingsResetButtonCancel.setOnClickListener { (activity as MainActivity).goBack() } - binding.settingsDetailsHeaderReset.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.settingsResetHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } } diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsTracingFragment.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsTracingFragment.kt index 89c4cdd24..219dfa2cd 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsTracingFragment.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/settings/SettingsTracingFragment.kt @@ -102,7 +102,7 @@ class SettingsTracingFragment : BaseFragment(), } } } - binding.settingsTracingHeader.informationHeader.headerButtonBack.buttonIcon.setOnClickListener { + binding.settingsTracingHeader.headerButtonBack.buttonIcon.setOnClickListener { (activity as MainActivity).goBack() } binding.settingsTracingStatusBluetooth.tracingStatusCardButton.setOnClickListener { diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information.xml b/Corona-Warn-App/src/main/res/layout/fragment_information.xml index 42f5e3ab8..777b2aee4 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information.xml @@ -8,130 +8,129 @@ </data> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <!-- todo details header layout can be merged with settings if designs stay as they are --> - <include - android:id="@+id/information_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:icon="@{@drawable/ic_close}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_title}" /> - - <include - android:id="@+id/information_about" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_header" - app:title="@{@string/information_about_title}" /> - - <include - android:id="@+id/information_privacy" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_about" - app:title="@{@string/information_privacy_title}" /> - - <include - android:id="@+id/information_terms" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_privacy" - app:title="@{@string/information_terms_title}" /> - - <include - android:id="@+id/information_contact" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_terms" - app:title="@{@string/information_contact_title}" /> - - <include - android:id="@+id/information_help" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_contact" - app:title="@{@string/information_help_title}" /> - - <include - android:id="@+id/information_technical" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_help" - app:title="@{@string/information_technical_title}" /> - - <include - android:id="@+id/information_legal" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_technical" - app:title="@{@string/information_legal_title}" /> - - <TextView - android:id="@+id/information_version" - style="@style/textMultiline" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@{FormatterInformationHelper.formatVersion()}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_legal" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - - </ScrollView> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_close}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_header"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/information_about" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_about_title}" /> + + <include + android:id="@+id/information_privacy" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_about" + app:title="@{@string/information_privacy_title}" /> + + <include + android:id="@+id/information_terms" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_privacy" + app:title="@{@string/information_terms_title}" /> + + <include + android:id="@+id/information_contact" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_terms" + app:title="@{@string/information_contact_title}" /> + + <include + android:id="@+id/information_help" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_contact" + app:title="@{@string/information_help_title}" /> + + <include + android:id="@+id/information_technical" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_help" + app:title="@{@string/information_technical_title}" /> + + <include + android:id="@+id/information_legal" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_technical" + app:title="@{@string/information_legal_title}" /> + + <TextView + android:id="@+id/information_version" + style="@style/textMultiline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@{FormatterInformationHelper.formatVersion()}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_legal" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information_about.xml b/Corona-Warn-App/src/main/res/layout/fragment_information_about.xml index e222be48e..66c542935 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information_about.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information_about.xml @@ -2,70 +2,94 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> + android:layout_height="match_parent"> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <!-- todo separate icon from onboarding? --> - <include - android:id="@+id/information_about_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:headline="@{@string/information_about_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_information_illustration_about}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_about_title}" /> + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_about_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_about_title}" /> - <TextView - android:id="@+id/information_about_body_emphasized" - style="@style/textMultilineEmphasized" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@string/information_about_body_emphasized" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_about_header" /> + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_about_header"> - <TextView - android:id="@+id/information_about_body" - style="@style/textMultiline" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@string/information_about_body" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_about_body_emphasized" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> + <include + android:id="@+id/information_about_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:headline="@{@string/information_about_headline}" + app:illustration="@{@drawable/ic_information_illustration_about}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> + <TextView + android:id="@+id/information_about_body_emphasized" + style="@style/textMultilineEmphasized" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@string/information_about_body_emphasized" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_about_header_details" /> + + <TextView + android:id="@+id/information_about_body" + style="@style/textMultiline" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@string/information_about_body" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_about_body_emphasized" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information_contact.xml b/Corona-Warn-App/src/main/res/layout/fragment_information_contact.xml index a8b9be9aa..69814d93f 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information_contact.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information_contact.xml @@ -2,99 +2,122 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <include - android:id="@+id/information_contact_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/information_contact_body}" - app:headline="@{@string/information_contact_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_information_illustration_contact}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_contact_title}" /> - - <TextView - android:id="@+id/information_contact_subtitle_phone" - style="@style/textLargeEmphasized" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@string/information_contact_subtitle_phone" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_contact_header" /> - - <include - android:id="@+id/information_contact_navigation_row_phone" - layout="@layout/include_navigation_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/information_contact_subtitle_phone" - app:subtitle="@{@string/information_contact_button_phone}" /> - - <TextView - android:id="@+id/information_contact_body_phone" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/information_contact_body_phone" - app:layout_constraintEnd_toEndOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_contact_navigation_row_phone" /> - - <TextView - android:id="@+id/information_contact_body_open" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:text="@string/information_contact_body_open" - app:layout_constraintEnd_toEndOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_contact_body_phone" /> - - <TextView - android:id="@+id/information_contact_body_other" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:text="@string/information_contact_body_other" - app:layout_constraintEnd_toEndOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_contact_body_open" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_contact_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_contact_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_contact_header"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/information_contact_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:headline="@{@string/information_contact_headline}" + app:illustration="@{@drawable/ic_information_illustration_contact}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/information_contact_subtitle_phone" + style="@style/textLargeEmphasized" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@string/information_contact_subtitle_phone" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_contact_header_details" /> + + <include + android:id="@+id/information_contact_navigation_row_phone" + layout="@layout/include_navigation_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_contact_subtitle_phone" + app:subtitle="@{@string/information_contact_button_phone}" /> + + <TextView + android:id="@+id/information_contact_body_phone" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/information_contact_body_phone" + app:layout_constraintEnd_toEndOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_contact_navigation_row_phone" /> + + <TextView + android:id="@+id/information_contact_body_open" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + android:text="@string/information_contact_body_open" + app:layout_constraintEnd_toEndOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_contact_body_phone" /> + + <TextView + android:id="@+id/information_contact_body_other" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + android:text="@string/information_contact_body_other" + app:layout_constraintEnd_toEndOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_contact_body_open" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information_legal.xml b/Corona-Warn-App/src/main/res/layout/fragment_information_legal.xml index 3f4c91ec3..03fda1730 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information_legal.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information_legal.xml @@ -2,75 +2,99 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> + android:layout_height="match_parent"> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_legal_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_legal_title}" /> - <include - android:id="@+id/information_legal_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:headline="@{@string/information_legal_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_information_illustration_legal}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_legal_title}" /> + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_legal_header"> - <TextView - android:id="@+id/text_sample_1" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/information_legal_body" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_legal_header" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <TextView - android:id="@+id/text_sample_2" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> + <include + android:id="@+id/information_legal_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:headline="@{@string/information_legal_headline}" + app:illustration="@{@drawable/ic_information_illustration_legal}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - <TextView - android:id="@+id/text_sample_3" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + <TextView + android:id="@+id/text_sample_1" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/information_legal_body" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_legal_header_details" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> + <TextView + android:id="@+id/text_sample_2" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> + <TextView + android:id="@+id/text_sample_3" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information_privacy.xml b/Corona-Warn-App/src/main/res/layout/fragment_information_privacy.xml index 889f75a31..fe958e6ff 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information_privacy.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information_privacy.xml @@ -2,76 +2,99 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> + android:layout_height="match_parent"> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_privacy_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_privacy_title}" /> - <!-- todo separate icon from onboarding? --> - <include - android:id="@+id/information_privacy_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:headline="@{@string/information_privacy_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_information_illustration_privacy}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_privacy_title}" /> + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_privacy_header"> - <TextView - android:id="@+id/text_sample_1" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_privacy_header" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <TextView - android:id="@+id/text_sample_2" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> + <include + android:id="@+id/information_privacy_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:headline="@{@string/information_privacy_headline}" + app:illustration="@{@drawable/ic_information_illustration_privacy}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - <TextView - android:id="@+id/text_sample_3" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + <TextView + android:id="@+id/text_sample_1" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_privacy_header_details" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> + <TextView + android:id="@+id/text_sample_2" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> + <TextView + android:id="@+id/text_sample_3" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information_technical.xml b/Corona-Warn-App/src/main/res/layout/fragment_information_technical.xml index f8c799f91..0f90814a2 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information_technical.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information_technical.xml @@ -2,75 +2,99 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> + android:layout_height="match_parent"> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_technical_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_technical_title}" /> - <include - android:id="@+id/information_technical_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:headline="@{@string/information_technical_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_information_illustration_technical}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_technical_title}" /> + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_technical_header"> - <TextView - android:id="@+id/text_sample_1" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_technical_header" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <TextView - android:id="@+id/text_sample_2" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> + <include + android:id="@+id/information_technical_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:headline="@{@string/information_technical_headline}" + app:illustration="@{@drawable/ic_information_illustration_technical}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - <TextView - android:id="@+id/text_sample_3" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + <TextView + android:id="@+id/text_sample_1" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_technical_header_details" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> + <TextView + android:id="@+id/text_sample_2" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> + <TextView + android:id="@+id/text_sample_3" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_information_terms.xml b/Corona-Warn-App/src/main/res/layout/fragment_information_terms.xml index b80435e35..f01bbfcc3 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_information_terms.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_information_terms.xml @@ -2,75 +2,99 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> + android:layout_height="match_parent"> - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/information_terms_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/information_terms_title}" /> - <include - android:id="@+id/information_terms_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:headline="@{@string/information_terms_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_information_illustration_terms}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/information_terms_title}" /> + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/information_terms_header"> - <TextView - android:id="@+id/text_sample_1" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/information_terms_header" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <TextView - android:id="@+id/text_sample_2" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> + <include + android:id="@+id/information_terms_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:headline="@{@string/information_terms_headline}" + app:illustration="@{@drawable/ic_information_illustration_terms}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - <TextView - android:id="@+id/text_sample_3" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/lorem_ipsum" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toEndOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + <TextView + android:id="@+id/text_sample_1" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/information_terms_header_details" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> + <TextView + android:id="@+id/text_sample_2" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_1" /> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> + <TextView + android:id="@+id/text_sample_3" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/lorem_ipsum" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toEndOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/text_sample_2" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_main_overview.xml b/Corona-Warn-App/src/main/res/layout/fragment_main_overview.xml index dacbd5d94..2b6dd7ba3 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_main_overview.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_main_overview.xml @@ -2,214 +2,242 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <!-- todo font adjustments needed through final styles --> - - <include - android:id="@+id/main_overview_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:icon="@{@drawable/ic_close}" - app:illustration="@{@drawable/ic_main_illustration_overview}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/main_overview_title}" /> - - <include - android:id="@+id/main_overview_tracing" - layout="@layout/include_main_overview_segment" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:body="@{@string/main_overview_body_tracing}" - app:icon="@{@drawable/ic_main_overview_1}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_header" - app:subtitle="@{@string/main_overview_subtitle_tracing}" /> - - <include - android:id="@+id/main_overview_risk" - layout="@layout/include_main_overview_segment" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:body="@{@string/main_overview_body_risk}" - app:icon="@{@drawable/ic_main_overview_2}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_tracing" - app:subtitle="@{@string/main_overview_subtitle_risk}" /> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/main_overview_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_close}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/main_overview_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_header"> <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/main_overview_risk_subtitle" - style="@style/row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_risk"> - - <TextView - style="@style/textLargeEmphasized" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/main_overview_header_details" + layout="@layout/include_information_details" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/guideline_body_title" - android:text="@string/main_overview_subtitle_risk_levels" + app:illustration="@{@drawable/ic_main_illustration_overview}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - </androidx.constraintlayout.widget.ConstraintLayout> + <include + android:id="@+id/main_overview_tracing" + layout="@layout/include_main_overview_segment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:body="@{@string/main_overview_body_tracing}" + app:icon="@{@drawable/ic_main_overview_1}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_header_details" + app:subtitle="@{@string/main_overview_subtitle_tracing}" /> - <include - android:id="@+id/main_overview_risk_increased_risk" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:iconStart="@{@drawable/ic_main_overview_circle}" - app:iconTint="@{@color/colorRiskCardIncreasedRisk}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_subtitle" - app:title="@{@string/main_overview_subtitle_increased_risk}" /> - - <include - android:id="@+id/main_overview_risk_low_risk" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:iconStart="@{@drawable/ic_main_overview_circle}" - app:iconTint="@{@color/colorRiskCardLowRisk}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_increased_risk" - app:title="@{@string/main_overview_subtitle_low_risk}" /> - - <include - android:id="@+id/main_overview_risk_unknown_risk" - layout="@layout/include_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:iconStart="@{@drawable/ic_main_overview_circle}" - app:iconTint="@{@color/colorRiskCardUnknownRisk}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_low_risk" - app:title="@{@string/main_overview_subtitle_unknown_risk}" /> - - <include - android:id="@+id/main_overview_test" - layout="@layout/include_main_overview_segment" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:body="@{@string/main_overview_body_test}" - app:icon="@{@drawable/ic_main_overview_3}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_unknown_risk" - app:subtitle="@{@string/main_overview_headline_test}" /> - - <include - android:id="@+id/main_overview_divider" - layout="@layout/include_divider" - android:layout_width="0dp" - android:layout_height="@dimen/card_divider" - android:layout_marginTop="@dimen/spacing_small" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/main_overview_test" /> + <include + android:id="@+id/main_overview_risk" + layout="@layout/include_main_overview_segment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:body="@{@string/main_overview_body_risk}" + app:icon="@{@drawable/ic_main_overview_2}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_tracing" + app:subtitle="@{@string/main_overview_subtitle_risk}" /> - <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/main_overview_glossary_headline" - style="@style/row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_divider"> - - <TextView - style="@style/textLargeEmphasized" + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/main_overview_risk_subtitle" + style="@style/row" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/guideline_body_title" - android:text="@string/main_overview_headline_glossary" + android:layout_marginTop="@dimen/spacing_normal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@+id/main_overview_risk"> + + <TextView + style="@style/textLargeEmphasized" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/guideline_body_title" + android:text="@string/main_overview_subtitle_risk_levels" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <include + android:id="@+id/main_overview_risk_increased_risk" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:iconStart="@{@drawable/ic_main_overview_circle}" + app:iconTint="@{@color/colorRiskCardIncreasedRisk}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_subtitle" + app:title="@{@string/main_overview_subtitle_increased_risk}" /> + + <include + android:id="@+id/main_overview_risk_low_risk" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:iconStart="@{@drawable/ic_main_overview_circle}" + app:iconTint="@{@color/colorRiskCardLowRisk}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_increased_risk" + app:title="@{@string/main_overview_subtitle_low_risk}" /> + + <include + android:id="@+id/main_overview_risk_unknown_risk" + layout="@layout/include_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:iconStart="@{@drawable/ic_main_overview_circle}" + app:iconTint="@{@color/colorRiskCardUnknownRisk}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_low_risk" + app:title="@{@string/main_overview_subtitle_unknown_risk}" /> + + <include + android:id="@+id/main_overview_test" + layout="@layout/include_main_overview_segment" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:body="@{@string/main_overview_body_test}" + app:icon="@{@drawable/ic_main_overview_3}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_risk_unknown_risk" + app:subtitle="@{@string/main_overview_headline_test}" /> + + <include + android:id="@+id/main_overview_divider" + layout="@layout/include_divider" + android:layout_width="0dp" + android:layout_height="@dimen/card_divider" + android:layout_marginTop="@dimen/spacing_small" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/main_overview_test" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/main_overview_glossary_headline" + style="@style/row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_divider"> + + <TextView + style="@style/textLargeEmphasized" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/guideline_body_title" + android:text="@string/main_overview_headline_glossary" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <include + android:id="@+id/main_overview_glossary_tracing" + layout="@layout/include_main_overview_glossary" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/main_overview_body_glossary_tracing}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_headline" + app:subtitle="@{@string/main_overview_subtitle_glossary_tracing}" /> + + <include + android:id="@+id/main_overview_glossary_calculation" + layout="@layout/include_main_overview_glossary" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/main_overview_body_glossary_calculation}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_tracing" + app:subtitle="@{@string/main_overview_subtitle_glossary_calculation}" /> + + <include + android:id="@+id/main_overview_glossary_contact" + layout="@layout/include_main_overview_glossary" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/main_overview_body_glossary_contact}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_calculation" + app:subtitle="@{@string/main_overview_subtitle_glossary_contact}" /> + + <include + android:id="@+id/main_overview_glossary_notification" + layout="@layout/include_main_overview_glossary" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/main_overview_body_glossary_notification}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_contact" + app:subtitle="@{@string/main_overview_subtitle_glossary_notification}" /> + + <include + android:id="@+id/main_overview_glossary_keys" + layout="@layout/include_main_overview_glossary" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/main_overview_body_glossary_keys}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_notification" + app:subtitle="@{@string/main_overview_subtitle_glossary_keys}" /> </androidx.constraintlayout.widget.ConstraintLayout> - <include - android:id="@+id/main_overview_glossary_tracing" - layout="@layout/include_main_overview_glossary" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/main_overview_body_glossary_tracing}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_headline" - app:subtitle="@{@string/main_overview_subtitle_glossary_tracing}" /> - - <include - android:id="@+id/main_overview_glossary_calculation" - layout="@layout/include_main_overview_glossary" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/main_overview_body_glossary_calculation}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_tracing" - app:subtitle="@{@string/main_overview_subtitle_glossary_calculation}" /> - - <include - android:id="@+id/main_overview_glossary_contact" - layout="@layout/include_main_overview_glossary" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/main_overview_body_glossary_contact}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_calculation" - app:subtitle="@{@string/main_overview_subtitle_glossary_contact}" /> - - <include - android:id="@+id/main_overview_glossary_notification" - layout="@layout/include_main_overview_glossary" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/main_overview_body_glossary_notification}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_contact" - app:subtitle="@{@string/main_overview_subtitle_glossary_notification}" /> - - <include - android:id="@+id/main_overview_glossary_keys" - layout="@layout/include_main_overview_glossary" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/main_overview_body_glossary_keys}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/main_overview_glossary_notification" - app:subtitle="@{@string/main_overview_subtitle_glossary_keys}" /> - - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_main_share.xml b/Corona-Warn-App/src/main/res/layout/fragment_main_share.xml index 45b42ae43..e9d8c18f5 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_main_share.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_main_share.xml @@ -7,70 +7,86 @@ <variable name="tracingViewModel" type="de.rki.coronawarnapp.ui.viewmodel.TracingViewModel" /> + </data> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <include - android:id="@+id/main_share_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/main_share_body}" - app:headline="@{@string/main_share_headline}" - app:icon="@{@drawable/ic_close}" - app:illustration="@{@drawable/ic_main_illustration_share}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/main_share_title}" /> - - <Button - android:id="@+id/main_share_button" - style="@style/buttonPrimary" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/main_share_button" - app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/main_share_header" - app:layout_constraintVertical_bias="1.0" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_bottom" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_bottom" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/main_share_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_close}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/main_share_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toTopOf="@+id/main_share_button" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/main_share_header"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/main_share_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/main_share_body}" + app:headline="@{@string/main_share_headline}" + app:illustration="@{@drawable/ic_main_illustration_share}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <Button + android:id="@+id/main_share_button" + style="@style/buttonPrimary" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/main_share_button" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_onboarding.xml b/Corona-Warn-App/src/main/res/layout/fragment_onboarding.xml index ed5747abc..bcb443501 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_onboarding.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_onboarding.xml @@ -17,7 +17,7 @@ app:bodyEmphasized="@{@string/onboarding_body_emphasized}" app:headline="@{@string/onboarding_headline}" app:illustration="@{@drawable/ic_onboarding_illustration_together}" - app:layout_constraintBottom_toTopOf="@+id/guideline_bottom" + app:layout_constraintBottom_toTopOf="@+id/onboarding_button_next" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/guideline_top" @@ -29,9 +29,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/onboarding_button_start" + app:layout_constraintBottom_toBottomOf="@id/guideline_bottom" app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/guideline_bottom" /> + app:layout_constraintStart_toStartOf="@id/guideline_start" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_top" @@ -45,7 +45,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_action" /> + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_start" diff --git a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_notifications.xml b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_notifications.xml index 1a52491df..e49dd7f0d 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_notifications.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_notifications.xml @@ -23,7 +23,7 @@ app:body="@{@string/onboarding_notifications_body}" app:headline="@{@string/onboarding_notifications_headline}" app:illustration="@{@drawable/ic_onboarding_illustration_notification}" - app:layout_constraintBottom_toTopOf="@+id/guideline_bottom" + app:layout_constraintBottom_toTopOf="@+id/onboarding_button_next" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/onboarding_button_back" @@ -35,9 +35,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/onboarding_button_next" + app:layout_constraintBottom_toBottomOf="@id/guideline_bottom" app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/guideline_bottom" /> + app:layout_constraintStart_toStartOf="@id/guideline_start" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_top" @@ -51,7 +51,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_action" /> + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_start" diff --git a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_privacy.xml b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_privacy.xml index 4163bb9cd..142abe258 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_privacy.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_privacy.xml @@ -24,7 +24,7 @@ app:bodyEmphasized="@{@string/onboarding_privacy_body_emphasized}" app:headline="@{@string/onboarding_privacy_headline}" app:illustration="@{@drawable/ic_onboarding_illustration_privacy}" - app:layout_constraintBottom_toTopOf="@+id/guideline_bottom" + app:layout_constraintBottom_toTopOf="@+id/onboarding_button_next" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/onboarding_button_back" @@ -36,9 +36,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/onboarding_button_next" + app:layout_constraintBottom_toBottomOf="@id/guideline_bottom" app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/guideline_bottom" /> + app:layout_constraintStart_toStartOf="@id/guideline_start" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_top" @@ -52,7 +52,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_action" /> + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_start" diff --git a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_test.xml b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_test.xml index 03214a4ac..7320e3241 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_test.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_test.xml @@ -23,7 +23,7 @@ app:body="@{@string/onboarding_test_body}" app:headline="@{@string/onboarding_test_headline}" app:illustration="@{@drawable/ic_onboarding_illustration_test}" - app:layout_constraintBottom_toTopOf="@+id/guideline_bottom" + app:layout_constraintBottom_toTopOf="@+id/onboarding_button_next" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/onboarding_button_back" @@ -35,9 +35,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/onboarding_button_next" + app:layout_constraintBottom_toBottomOf="@id/guideline_bottom" app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/guideline_bottom" /> + app:layout_constraintStart_toStartOf="@id/guideline_start" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_top" @@ -51,7 +51,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_action" /> + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_start" diff --git a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_tracing.xml b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_tracing.xml index 56b0bd8f3..cb906cfba 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_onboarding_tracing.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_onboarding_tracing.xml @@ -24,7 +24,7 @@ app:bodyEmphasized="@{@string/onboarding_tracing_body_emphasized}" app:headline="@{@string/onboarding_tracing_headline}" app:illustration="@{@drawable/ic_onboarding_illustration_tracing}" - app:layout_constraintBottom_toTopOf="@+id/guideline_bottom" + app:layout_constraintBottom_toTopOf="@+id/onboarding_button_next" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/onboarding_button_back" @@ -35,21 +35,21 @@ style="@style/buttonPrimary" android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/spacing_small" android:text="@string/onboarding_button_next" + app:layout_constraintBottom_toTopOf="@id/onboarding_button_disable" app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/guideline_bottom" /> + app:layout_constraintStart_toStartOf="@id/guideline_start" /> <Button android:id="@+id/onboarding_button_disable" style="@style/buttonLight" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" android:text="@string/onboarding_button_disable" + app:layout_constraintBottom_toBottomOf="@id/guideline_bottom" app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/onboarding_button_next" /> + app:layout_constraintStart_toStartOf="@id/guideline_start" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_top" @@ -63,7 +63,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_action_large" /> + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_start" diff --git a/Corona-Warn-App/src/main/res/layout/fragment_risk_details.xml b/Corona-Warn-App/src/main/res/layout/fragment_risk_details.xml index 8335d8010..658a2059d 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_risk_details.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_risk_details.xml @@ -20,198 +20,213 @@ type="de.rki.coronawarnapp.ui.viewmodel.SettingsViewModel" /> </data> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true" - tools:context=".ui.riskdetails.RiskDetailsFragment"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingBottom="@dimen/spacing_normal"> - - <include - android:id="@+id/risk_details_risk_card" - layout="@layout/include_risk_card" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:settingsViewModel="@{settingsViewModel}" - app:showDetails="@{true}" - app:tracingViewModel="@{tracingViewModel}" /> - - <TextView - android:id="@+id/risk_details_behavior_headline" - style="@style/textLargeEmphasized" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:text="@string/risk_details_headline_behavior" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/risk_details_risk_card" /> - - <TextView - android:id="@+id/risk_details_behavior_subtitle" - style="@style/textMultiline" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_tiny" - android:text="@string/risk_details_subtitle_behavior" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/risk_details_behavior_headline" /> + android:layout_height="match_parent"> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toTopOf="@+id/risk_details_button_enable_tracing" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/risk_details_behavior_wrapper" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/risk_details_behavior_subtitle"> - - <include - android:id="@+id/risk_details_behavior" - layout="@layout/include_risk_details_behavior" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:visibility="@{FormatterRiskHelper.formatVisibilityBehavior(tracingViewModel.riskLevel)}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:tracingViewModel="@{tracingViewModel}" /> + android:layout_width="match_parent" + android:layout_height="wrap_content"> <include - android:id="@+id/risk_details_behavior_increased_risk" - layout="@layout/include_risk_details_behavior_increased_risk" + android:id="@+id/risk_details_risk_card" + layout="@layout/include_risk_card" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:visibility="@{FormatterRiskHelper.formatVisibilityBehaviorIncreasedRisk(tracingViewModel.riskLevel)}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" + app:settingsViewModel="@{settingsViewModel}" + app:showDetails="@{true}" app:tracingViewModel="@{tracingViewModel}" /> - </androidx.constraintlayout.widget.ConstraintLayout> - - <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/risk_details_body" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_large" - android:background="@color/colorGreyLight" - android:padding="@dimen/spacing_normal" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/risk_details_behavior_wrapper"> - <TextView - android:id="@+id/risk_details_information_headline" + android:id="@+id/risk_details_behavior_headline" style="@style/textLargeEmphasized" - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/risk_details_headline_infection_risk" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + android:layout_marginTop="@dimen/spacing_normal" + android:text="@string/risk_details_headline_behavior" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/risk_details_risk_card" /> <TextView - android:id="@+id/risk_details_information_subtitle" + android:id="@+id/risk_details_behavior_subtitle" style="@style/textMultiline" - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="@dimen/spacing_tiny" - android:text="@{FormatterRiskHelper.formatRiskDetailsRiskLevelSubtitle(tracingViewModel.riskLevel)}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/risk_details_information_headline" /> + android:text="@string/risk_details_subtitle_behavior" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/risk_details_behavior_headline" /> - <TextView - android:id="@+id/risk_details_information_body" - style="@style/textMultiline" + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/risk_details_behavior_wrapper" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toStartOf="@+id/guideline_end" + app:layout_constraintStart_toStartOf="@+id/guideline_start" + app:layout_constraintTop_toBottomOf="@id/risk_details_behavior_subtitle"> + + <include + android:id="@+id/risk_details_behavior" + layout="@layout/include_risk_details_behavior" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + android:visibility="@{FormatterRiskHelper.formatVisibilityBehavior(tracingViewModel.riskLevel)}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:tracingViewModel="@{tracingViewModel}" /> + + <include + android:id="@+id/risk_details_behavior_increased_risk" + layout="@layout/include_risk_details_behavior_increased_risk" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + android:visibility="@{FormatterRiskHelper.formatVisibilityBehaviorIncreasedRisk(tracingViewModel.riskLevel)}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:tracingViewModel="@{tracingViewModel}" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/risk_details_body" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@{FormatterRiskHelper.formatRiskDetailsRiskLevelBody(tracingViewModel.riskLevel, tracingViewModel.daysSinceLastExposure)}" - android:visibility="@{FormatterHelper.formatVisibilityText(FormatterRiskHelper.formatRiskDetailsRiskLevelBody(tracingViewModel.riskLevel, tracingViewModel.daysSinceLastExposure))}" + android:layout_marginTop="@dimen/spacing_large" + android:background="@color/colorGreyLight" + android:padding="@dimen/spacing_normal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/risk_details_information_subtitle" /> + app:layout_constraintTop_toBottomOf="@id/risk_details_behavior_wrapper"> + + <TextView + android:id="@+id/risk_details_information_headline" + style="@style/textLargeEmphasized" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/risk_details_headline_infection_risk" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/risk_details_information_subtitle" + style="@style/textMultiline" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_tiny" + android:text="@{FormatterRiskHelper.formatRiskDetailsRiskLevelSubtitle(tracingViewModel.riskLevel)}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/risk_details_information_headline" /> + + <TextView + android:id="@+id/risk_details_information_body" + style="@style/textMultiline" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@{FormatterRiskHelper.formatRiskDetailsRiskLevelBody(tracingViewModel.riskLevel, tracingViewModel.daysSinceLastExposure)}" + android:visibility="@{FormatterHelper.formatVisibilityText(FormatterRiskHelper.formatRiskDetailsRiskLevelBody(tracingViewModel.riskLevel, tracingViewModel.daysSinceLastExposure))}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/risk_details_information_subtitle" /> + + <TextView + android:id="@+id/risk_details_information_body_notice" + style="@style/textMultiline" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@string/risk_details_information_body_notice" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/risk_details_information_body" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> - <TextView - android:id="@+id/risk_details_information_body_notice" - style="@style/textMultiline" - android:layout_width="match_parent" + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@string/risk_details_information_body_notice" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/risk_details_information_body" /> + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> </androidx.constraintlayout.widget.ConstraintLayout> - <Button - android:id="@+id/risk_details_button_update" - style="@style/buttonPrimary" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:enabled="@{FormatterRiskHelper.formatButtonUpdateEnabled(settingsViewModel.isManualKeyRetrievalEnabled())}" - android:text="@{FormatterRiskHelper.formatButtonUpdateText(settingsViewModel.manualKeyRetrievalText)}" - android:visibility="@{FormatterRiskHelper.formatDetailsButtonUpdateVisibility(settingsViewModel.isBackgroundJobEnabled(), tracingViewModel.riskLevel)}" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/risk_details_body" - tools:text="@string/risk_details_button_update" /> - - <Button - android:id="@+id/risk_details_button_enable_tracing" - style="@style/buttonGrey" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:text="@string/risk_card_button_enable_tracing" - android:visibility="@{FormatterRiskHelper.formatRiskDetailsButtonEnableTracingVisibility(tracingViewModel.riskLevel)}" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/risk_details_button_update" - tools:text="@string/risk_card_button_enable_tracing" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_bottom" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_bottom" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - </androidx.constraintlayout.widget.ConstraintLayout> - - </ScrollView> + </ScrollView> + + <Button + android:id="@+id/risk_details_button_enable_tracing" + style="@style/buttonGrey" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/risk_card_button_enable_tracing" + android:visibility="@{FormatterRiskHelper.formatRiskDetailsButtonEnableTracingVisibility(tracingViewModel.riskLevel)}" + app:layout_constraintBottom_toTopOf="@+id/risk_details_button_update" + app:layout_constraintEnd_toStartOf="@+id/guideline_end_outer" + app:layout_constraintStart_toStartOf="@+id/guideline_start_outer" + tools:text="@string/risk_card_button_enable_tracing" /> + + <Button + android:id="@+id/risk_details_button_update" + style="@style/buttonPrimary" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:enabled="@{FormatterRiskHelper.formatButtonUpdateEnabled(settingsViewModel.isManualKeyRetrievalEnabled())}" + android:text="@{FormatterRiskHelper.formatButtonUpdateText(settingsViewModel.manualKeyRetrievalText)}" + android:visibility="@{FormatterRiskHelper.formatDetailsButtonUpdateVisibility(settingsViewModel.isBackgroundJobEnabled(), tracingViewModel.riskLevel)}" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toStartOf="@+id/guideline_end_outer" + app:layout_constraintStart_toStartOf="@+id/guideline_start_outer" + tools:text="@string/risk_details_button_update" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start_outer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end_outer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_settings.xml b/Corona-Warn-App/src/main/res/layout/fragment_settings.xml index d28ec71c0..677f97666 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_settings.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_settings.xml @@ -17,128 +17,120 @@ </data> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true" - tools:context=".ui.settings.SettingsFragment"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <include - android:id="@+id/settings_header" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:icon="@{@drawable/ic_close}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/settings_title}" /> - - <include - android:id="@+id/settings_tracing" - layout="@layout/include_setting_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:body="@{@string/settings_tracing_body_description}" - app:icon="@{@drawable/ic_settings_tracing_active}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_header" - app:showDivider="@{true}" - app:color="@{FormatterSettingsHelper.formatIconColor(tracingViewModel.isTracingEnabled())}" - app:statusText="@{FormatterSettingsHelper.formatTracingStatusText(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:subtitle="@{@string/settings_tracing_title}" - app:tracingViewModel="@{tracingViewModel}" /> - - <include - android:id="@+id/settings_notifications" - layout="@layout/include_setting_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/settings_notifications_body_description}" - app:icon="@{@drawable/ic_settings_notification}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_tracing" - app:showDivider="@{true}" - app:color="@{FormatterSettingsHelper.formatIconColor(settingsViewModel.isNotificationsEnabled(), settingsViewModel.isNotificationsRiskEnabled(), settingsViewModel.isNotificationsTestEnabled())}" - app:statusText="@{FormatterSettingsHelper.formatNotificationsStatusText(settingsViewModel.isNotificationsEnabled(), settingsViewModel.isNotificationsRiskEnabled(), settingsViewModel.isNotificationsTestEnabled())}" - app:subtitle="@{@string/settings_notifications_title}" - app:tracingViewModel="@{tracingViewModel}" /> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/settings_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_close}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/settings_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_header"> <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/settings_reset" - style="@style/row" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_notifications"> + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <androidx.constraintlayout.widget.ConstraintLayout + <include + android:id="@+id/settings_tracing" + layout="@layout/include_setting_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:body="@{@string/settings_tracing_body_description}" + app:color="@{FormatterSettingsHelper.formatIconColor(tracingViewModel.isTracingEnabled())}" + app:icon="@{@drawable/ic_settings_tracing_active}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:showDivider="@{true}" + app:statusText="@{FormatterSettingsHelper.formatTracingStatusText(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" + app:subtitle="@{@string/settings_tracing_title}" + app:tracingViewModel="@{tracingViewModel}" /> + + <include + android:id="@+id/settings_notifications" + layout="@layout/include_setting_row" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/guideline_body_title" + app:body="@{@string/settings_notifications_body_description}" + app:color="@{FormatterSettingsHelper.formatIconColor(settingsViewModel.isNotificationsEnabled(), settingsViewModel.isNotificationsRiskEnabled(), settingsViewModel.isNotificationsTestEnabled())}" + app:icon="@{@drawable/ic_settings_notification}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent"> + app:layout_constraintTop_toBottomOf="@+id/settings_tracing" + app:showDivider="@{true}" + app:statusText="@{FormatterSettingsHelper.formatNotificationsStatusText(settingsViewModel.isNotificationsEnabled(), settingsViewModel.isNotificationsRiskEnabled(), settingsViewModel.isNotificationsTestEnabled())}" + app:subtitle="@{@string/settings_notifications_title}" + app:tracingViewModel="@{tracingViewModel}" /> - <TextView - android:id="@+id/settings_reset_subtitle" - style="@style/textDanger" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/settings_reset_button_positive" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/settings_reset" + style="@style/row" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_notifications"> - <TextView - android:id="@+id/settings_reset_body" + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="0dp" android:layout_height="wrap_content" - android:text="@string/settings_reset_body_description" + android:layout_marginStart="@dimen/guideline_body_title" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_reset_subtitle" /> + app:layout_constraintTop_toTopOf="parent"> + + <TextView + android:id="@+id/settings_reset_subtitle" + style="@style/textDanger" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/settings_reset_button_positive" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/settings_reset_body" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/settings_reset_body_description" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_reset_subtitle" /> + + </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_bottom" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_bottom" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_settings_notifications.xml b/Corona-Warn-App/src/main/res/layout/fragment_settings_notifications.xml index 4b80ee38e..c31301938 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_settings_notifications.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_settings_notifications.xml @@ -9,103 +9,120 @@ <import type="de.rki.coronawarnapp.util.formatter.FormatterSettingsHelper" /> - <variable - name="tracingViewModel" - type="de.rki.coronawarnapp.ui.viewmodel.TracingViewModel" /> - <variable name="settingsViewModel" type="de.rki.coronawarnapp.ui.viewmodel.SettingsViewModel" /> </data> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true" - tools:context=".ui.settings.SettingsNotificationFragment"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <include - android:id="@+id/settings_details_header_notifications" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{FormatterSettingsHelper.formatNotificationsDescription(settingsViewModel.isNotificationsEnabled())}" - app:headline="@{FormatterSettingsHelper.formatNotificationsTitle(settingsViewModel.isNotificationsEnabled())}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{FormatterSettingsHelper.formatNotificationImage(settingsViewModel.isNotificationsEnabled())}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/settings_notifications_title}" /> - - <include - android:id="@+id/settings_switch_row_notifications_risk" - layout="@layout/include_settings_switch_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:visibility="@{FormatterHelper.formatVisibility(settingsViewModel.isNotificationsEnabled())}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_details_header_notifications" - app:showDivider="@{true}" - app:status="@{settingsViewModel.isNotificationsRiskEnabled()}" - app:statusText="@{FormatterSettingsHelper.formatStatus(settingsViewModel.isNotificationsRiskEnabled())}" - app:enabled="@{true}" - app:subtitle="@{@string/settings_notifications_subtitle_update_risk}" /> - - <include - android:id="@+id/settings_switch_row_notifications_test" - layout="@layout/include_settings_switch_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:visibility="@{FormatterHelper.formatVisibility(settingsViewModel.isNotificationsEnabled())}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_switch_row_notifications_risk" - app:showDivider="@{true}" - app:status="@{settingsViewModel.isNotificationsTestEnabled()}" - app:enabled="@{true}" - app:statusText="@{FormatterSettingsHelper.formatStatus(settingsViewModel.isNotificationsTestEnabled())}" - app:subtitle="@{@string/settings_notifications_subtitle_update_test}" /> - - <include - android:id="@+id/settings_navigation_row_system" - layout="@layout/include_navigation_row" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:visibility="@{FormatterHelper.formatVisibilityInverted(settingsViewModel.isNotificationsEnabled())}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/settings_switch_row_notifications_test" - app:subtitle="@{@string/settings_notifications_button_open_settings}" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - - - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/settings_notifications_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/settings_notifications_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_notifications_header"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/settings_notifications_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{FormatterSettingsHelper.formatNotificationsDescription(settingsViewModel.isNotificationsEnabled())}" + app:headline="@{FormatterSettingsHelper.formatNotificationsTitle(settingsViewModel.isNotificationsEnabled())}" + app:illustration="@{FormatterSettingsHelper.formatNotificationImage(settingsViewModel.isNotificationsEnabled())}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <include + android:id="@+id/settings_switch_row_notifications_risk" + layout="@layout/include_settings_switch_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:visibility="@{FormatterHelper.formatVisibility(settingsViewModel.isNotificationsEnabled())}" + app:enabled="@{true}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_notifications_header_details" + app:showDivider="@{true}" + app:status="@{settingsViewModel.isNotificationsRiskEnabled()}" + app:statusText="@{FormatterSettingsHelper.formatStatus(settingsViewModel.isNotificationsRiskEnabled())}" + app:subtitle="@{@string/settings_notifications_subtitle_update_risk}" /> + + <include + android:id="@+id/settings_switch_row_notifications_test" + layout="@layout/include_settings_switch_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:visibility="@{FormatterHelper.formatVisibility(settingsViewModel.isNotificationsEnabled())}" + app:enabled="@{true}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_switch_row_notifications_risk" + app:showDivider="@{true}" + app:status="@{settingsViewModel.isNotificationsTestEnabled()}" + app:statusText="@{FormatterSettingsHelper.formatStatus(settingsViewModel.isNotificationsTestEnabled())}" + app:subtitle="@{@string/settings_notifications_subtitle_update_test}" /> + + <include + android:id="@+id/settings_navigation_row_system" + layout="@layout/include_navigation_row" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + android:visibility="@{FormatterHelper.formatVisibilityInverted(settingsViewModel.isNotificationsEnabled())}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_switch_row_notifications_test" + app:subtitle="@{@string/settings_notifications_button_open_settings}" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_settings_reset.xml b/Corona-Warn-App/src/main/res/layout/fragment_settings_reset.xml index b90a328ac..b3d4f8ec0 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_settings_reset.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_settings_reset.xml @@ -3,105 +3,121 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> - <data> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> - <variable - name="tracingViewModel" - type="de.rki.coronawarnapp.ui.viewmodel.TracingViewModel" /> - </data> + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/settings_reset_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_back}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/settings_reset_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toTopOf="@+id/settings_reset_button_delete" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_reset_header"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <include + android:id="@+id/settings_reset_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:body="@{@string/settings_reset_body}" + app:headline="@{@string/settings_reset_headline}" + app:illustration="@{@drawable/ic_settings_illustration_reset}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <include + android:id="@+id/settings_reset_keys" + layout="@layout/include_tracing_status_card" + android:layout_width="@dimen/match_constraint" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_normal" + app:body="@{@string/settings_reset_body_keys}" + app:headline="@{@string/settings_reset_headline_keys}" + app:icon="@{@drawable/ic_settings_reset_circle}" + app:layout_constraintEnd_toEndOf="@id/guideline_end" + app:layout_constraintStart_toStartOf="@id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/settings_reset_header_details" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </ScrollView> + + <Button + android:id="@+id/settings_reset_button_delete" + style="@style/buttonReset" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/spacing_small" + android:text="@string/settings_reset_button_positive" + app:layout_constraintBottom_toTopOf="@+id/settings_reset_button_cancel" + app:layout_constraintEnd_toStartOf="@+id/guideline_end_outer" + app:layout_constraintStart_toStartOf="@+id/guideline_start_outer" /> + + <Button + android:id="@+id/settings_reset_button_cancel" + style="@style/buttonLight" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="@string/settings_reset_button_negative" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toStartOf="@+id/guideline_end_outer" + app:layout_constraintStart_toStartOf="@+id/guideline_start_outer" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start_outer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end_outer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> - <ScrollView - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true" - tools:context="de.rki.coronawarnapp.ui.settings.SettingsResetFragment"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <include - android:id="@+id/settings_details_header_reset" - layout="@layout/include_information_details_header" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:body="@{@string/settings_reset_body}" - app:headline="@{@string/settings_reset_headline}" - app:icon="@{@drawable/ic_back}" - app:illustration="@{@drawable/ic_settings_illustration_reset}" - app:layout_constraintBottom_toTopOf="@id/guideline_bottom" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0" - app:title="@{@string/settings_reset_title}" /> - - <include - android:id="@+id/settings_reset_keys" - layout="@layout/include_tracing_status_card" - android:layout_width="@dimen/match_constraint" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:body="@{@string/settings_reset_body_keys}" - app:headline="@{@string/settings_reset_headline_keys}" - app:icon="@{@drawable/ic_settings_reset_circle}" - app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/settings_details_header_reset" /> - - <Button - android:id="@+id/settings_reset_button_delete" - style="@style/buttonReset" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - android:text="@string/settings_reset_button_positive" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/settings_reset_keys" /> - - <Button - android:id="@+id/settings_reset_button_cancel" - style="@style/buttonLight" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@string/settings_reset_button_negative" - app:layout_constraintEnd_toStartOf="@+id/guideline_end" - app:layout_constraintStart_toStartOf="@+id/guideline_start" - app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" - app:layout_constraintTop_toBottomOf="@id/settings_reset_button_delete" - app:layout_constraintVertical_bias="0" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_bottom" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_bottom" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - - </androidx.constraintlayout.widget.ConstraintLayout> - - </ScrollView> </layout> \ No newline at end of file diff --git a/Corona-Warn-App/src/main/res/layout/fragment_settings_tracing.xml b/Corona-Warn-App/src/main/res/layout/fragment_settings_tracing.xml index ce5b61389..6937162f0 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_settings_tracing.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_settings_tracing.xml @@ -19,156 +19,171 @@ type="de.rki.coronawarnapp.ui.viewmodel.SettingsViewModel" /> </data> - <ScrollView + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true" - tools:context="de.rki.coronawarnapp.ui.settings.SettingsTracingFragment"> - - <androidx.constraintlayout.widget.ConstraintLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <include - android:id="@+id/settings_tracing_header" - layout="@layout/include_information_details_header" - android:layout_width="@dimen/match_constraint" - android:layout_height="wrap_content" - app:headline="@{@string/settings_tracing_headline}" - app:icon="@{@drawable/ic_close}" - app:illustration="@{FormatterSettingsHelper.formatTracingStatusImage(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:title="@{@string/settings_tracing_title}" /> - - <include - android:id="@+id/settings_tracing_switch_row" - layout="@layout/include_settings_switch_row" - android:layout_width="@dimen/match_constraint" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:enabled="@{FormatterSettingsHelper.formatTracingSwitchEnabled(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:showDivider="@{true}" - app:layout_constraintTop_toBottomOf="@+id/settings_tracing_header" - app:status="@{FormatterSettingsHelper.formatTracingSwitch(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:statusText="@{FormatterSettingsHelper.formatTracingStatusText(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:subtitle="@{@string/settings_tracing_title}" /> + android:layout_height="match_parent"> + + <!-- todo font adjustments needed through final styles --> + <include + android:id="@+id/settings_tracing_header" + layout="@layout/include_header" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:icon="@{@drawable/ic_close}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:title="@{@string/settings_tracing_title}" /> + + <ScrollView + style="@style/fadingScrollView" + android:layout_width="0dp" + android:layout_height="0dp" + android:fillViewport="true" + app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/settings_tracing_header"> <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/settings_tracing_status" - android:layout_width="@dimen/match_constraint" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@+id/settings_tracing_switch_row"> + android:layout_width="match_parent" + android:layout_height="wrap_content"> <include - android:id="@+id/settings_tracing_status_bluetooth" - layout="@layout/include_tracing_status_card" - android:layout_width="@dimen/match_constraint" + android:id="@+id/settings_tracing_header_details" + layout="@layout/include_information_details" + android:layout_width="0dp" android:layout_height="wrap_content" - android:visibility="@{FormatterSettingsHelper.formatTracingStatusVisibilityBluetooth(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:body="@{@string/settings_tracing_status_bluetooth_body}" - app:buttonText="@{@string/settings_tracing_status_bluetooth_button}" - app:headline="@{@string/settings_tracing_status_bluetooth_headline}" - app:icon="@{@drawable/ic_settings_tracing_bluetooth}" + app:headline="@{@string/settings_tracing_headline}" + app:illustration="@{FormatterSettingsHelper.formatTracingStatusImage(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <include - android:id="@+id/settings_tracing_status_connection" - layout="@layout/include_tracing_status_card" + android:id="@+id/settings_tracing_switch_row" + layout="@layout/include_settings_switch_row" android:layout_width="@dimen/match_constraint" android:layout_height="wrap_content" - android:visibility="@{FormatterSettingsHelper.formatTracingStatusConnection(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:body="@{@string/settings_tracing_status_connection_body}" - app:buttonText="@{@string/settings_tracing_status_connection_button}" - app:headline="@{@string/settings_tracing_status_connection_headline}" - app:icon="@{@drawable/ic_settings_tracing_connection}" + android:layout_marginTop="@dimen/spacing_normal" + app:enabled="@{FormatterSettingsHelper.formatTracingSwitchEnabled(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@+id/settings_tracing_header_details" + app:showDivider="@{true}" + app:status="@{FormatterSettingsHelper.formatTracingSwitch(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" + app:statusText="@{FormatterSettingsHelper.formatTracingStatusText(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" + app:subtitle="@{@string/settings_tracing_title}" /> <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/settings_tracing_status_tracing" + android:id="@+id/settings_tracing_status" android:layout_width="@dimen/match_constraint" android:layout_height="wrap_content" android:layout_marginTop="@dimen/spacing_small" - android:visibility="@{FormatterSettingsHelper.formatTracingStatusVisibilityTracing(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent"> - - <de.rki.coronawarnapp.ui.view.CircleProgress - android:id="@+id/settings_tracing_status_tracing_circle_progress" - android:layout_width="40dp" - android:layout_height="40dp" - app:circleWidth="10" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="@id/guideline_end" + app:layout_constraintStart_toStartOf="@id/guideline_start" + app:layout_constraintTop_toBottomOf="@+id/settings_tracing_switch_row"> + + <include + android:id="@+id/settings_tracing_status_bluetooth" + layout="@layout/include_tracing_status_card" + android:layout_width="@dimen/match_constraint" + android:layout_height="wrap_content" + android:visibility="@{FormatterSettingsHelper.formatTracingStatusVisibilityBluetooth(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" + app:body="@{@string/settings_tracing_status_bluetooth_body}" + app:buttonText="@{@string/settings_tracing_status_bluetooth_button}" + app:headline="@{@string/settings_tracing_status_bluetooth_headline}" + app:icon="@{@drawable/ic_settings_tracing_bluetooth}" + app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:progress="@{tracingViewModel.activeTracingDaysInRetentionPeriod}" /> + app:layout_constraintTop_toTopOf="parent" /> - <TextView - android:id="@+id/settings_tracing_status_tracing_body" - style="@style/textMultiline" + <include + android:id="@+id/settings_tracing_status_connection" + layout="@layout/include_tracing_status_card" android:layout_width="@dimen/match_constraint" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/spacing_small" - android:text="@{FormatterSettingsHelper.formatTracingStatusBody(tracingViewModel.isTracingEnabled(), tracingViewModel.activeTracingDaysInRetentionPeriod)}" - app:layout_constraintBottom_toBottomOf="parent" + android:visibility="@{FormatterSettingsHelper.formatTracingStatusConnection(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" + app:body="@{@string/settings_tracing_status_connection_body}" + app:buttonText="@{@string/settings_tracing_status_connection_button}" + app:headline="@{@string/settings_tracing_status_connection_headline}" + app:icon="@{@drawable/ic_settings_tracing_connection}" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toEndOf="@+id/settings_tracing_status_tracing_circle_progress" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/settings_tracing_status_tracing" + android:layout_width="@dimen/match_constraint" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:visibility="@{FormatterSettingsHelper.formatTracingStatusVisibilityTracing(tracingViewModel.isTracingEnabled(), settingsViewModel.isBluetoothEnabled(), settingsViewModel.isConnectionEnabled())}" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <de.rki.coronawarnapp.ui.view.CircleProgress + android:id="@+id/settings_tracing_status_tracing_circle_progress" + android:layout_width="40dp" + android:layout_height="40dp" + app:circleWidth="10" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:progress="@{tracingViewModel.activeTracingDaysInRetentionPeriod}" /> + + <TextView + android:id="@+id/settings_tracing_status_tracing_body" + style="@style/textMultiline" + android:layout_width="@dimen/match_constraint" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/spacing_small" + android:text="@{FormatterSettingsHelper.formatTracingStatusBody(tracingViewModel.isTracingEnabled(), tracingViewModel.activeTracingDaysInRetentionPeriod)}" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/settings_tracing_status_tracing_circle_progress" + app:layout_constraintTop_toTopOf="parent" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </androidx.constraintlayout.widget.ConstraintLayout> + <TextView + android:id="@+id/settings_tracing_body" + style="@style/textMultiline" + android:layout_width="@dimen/match_constraint" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_small" + android:text="@string/settings_tracing_body_text" + app:layout_constraintEnd_toEndOf="@id/guideline_end" + app:layout_constraintStart_toStartOf="@id/guideline_start" + app:layout_constraintTop_toBottomOf="@id/settings_tracing_status" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_begin="@dimen/guideline_start" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_end" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_end="@dimen/guideline_end" /> + </androidx.constraintlayout.widget.ConstraintLayout> - <TextView - android:id="@+id/settings_tracing_body" - style="@style/textMultiline" - android:layout_width="@dimen/match_constraint" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:text="@string/settings_tracing_body_text" - app:layout_constraintEnd_toEndOf="@id/guideline_end" - app:layout_constraintStart_toStartOf="@id/guideline_start" - app:layout_constraintTop_toBottomOf="@id/settings_tracing_status" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_begin="@dimen/guideline_start" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_bottom" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_end="@dimen/guideline_bottom" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - app:layout_constraintGuide_end="@dimen/guideline_end" /> - - <androidx.constraintlayout.widget.Guideline - android:id="@+id/guideline_top" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - app:layout_constraintGuide_begin="@dimen/guideline_top" /> - - </androidx.constraintlayout.widget.ConstraintLayout> - </ScrollView> + </ScrollView> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline_bottom" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_end="@dimen/guideline_bottom" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </layout> \ No newline at end of file -- GitLab