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 09308fcbcfc01b5ea5a480f14ffafae3e66bede4..7107692858b881eac96b7472e3e88770ad19ddf5 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 e05286d770da4d0625b4d7a2ff50343b5d917eb2..3f0c11ba0b58dab00883fcff7faa12dc2800f162 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 34a1994eb917e2aad242bb8baf21482e088ffdf2..befc5d4ef0981886f39eebf9555406bab3ca72d4 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 c8e749ae390d193e28162c0c2863ba0c565bc52f..2d32a639d14c751fd4d015c5e2f2d8defbb8d013 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 79fc00d186efffca3d3d5ead54391a437f6be09e..7b3cc61e44cfe8aafdd007c016e955f2a076dd4c 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 a240ada4f569179dab302911b99ca87b6bb529b4..a4e295f7e5e30c3525b164f08240e0bc8294be30 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 8581c18eab960411be337ba0267b0a34c2dee321..486172f2a36d982f5f641b006c01708bad2c6d47 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 5a007838f7bbd276978b91205c01850896fd98e6..03d4f39297202d74b84262ed53cc4f537dc1ef41 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 9bff3a7ade91187967d67c1d86f56429e787f95d..e6b42e0eab63e620e68c122cf92df54947561464 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 0e36914cd7aa90beba5380111d72626b0aff45b9..ed39f3716067f5f353c59e90740a59f9d5b2fcf1 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 7e335ef7c0ced13900475cf5e086f0af536d3188..695362b30c0d7ad3bd044cfe18308642eb4eb673 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 9975bdcdd685cadd3f060c5aa2b5cd1f29e9010a..0606f781908a2808c4e184f3c9fcc9cbb348f0de 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 89c4cdd24c74a0dbc744c83fd2f2d81e82b6db6f..219dfa2cd4b05121813785ba867b375750e543dd 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 42f5e3ab808b2b549bc4688bcecbad1c408dea6e..777b2aee4b927fea36bcf3972d4b971092a05b20 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 e222be48e288780a838123e5aa56309a8cf2085f..66c5429351429fc1402eb8a947263752e56bb14e 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 a8b9be9aa338e651c01958eb1381856314c9d502..69814d93fc31725c83624e1a7b736e4cd0468d38 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 3f4c91ec331cf49192444fd656daf349462e2cbf..03fda1730c7b36dff8273189d033236bac1ef8f8 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 889f75a31c32e29f032ab178dddbc2c635e5a93c..fe958e6ffb0e6463b65531a8dbe90353070084cf 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 f8c799f913dfda89b630a20345abfa17cbe6f89f..0f90814a25f4675d6f761a0117b3dfc0530617c9 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 b80435e35f89d7578a42ac9ab53cd1c5af1b9872..f01bbfcc3f672e5955d0915ed23397e9aa3607a3 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 dacbd5d94600b3b2438909f14e3547c8fe23ebfd..2b6dd7ba3d38a3e75e72c7498d6fbff72294b25b 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 45b42ae43ed125e8198155abf18a5bc93e23cb4c..e9d8c18f506ec2389c3eacbaf388a376074748e6 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 ed5747abc27c2ad77ebee72f169e9a213c465e5f..bcb44350181d4a6570de9fa102877f5b9b0ff17a 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 1a52491df69ab91381641f91f356844b94643495..e49dd7f0d3bd39aa3857737b4f693253fb6c0772 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 4163bb9cdf82b17cee46f328009b7c15155c8945..142abe258d7f06e621a6ce3460c882dd998a37e0 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 03214a4ac06ea59b1e850204d2c79e0015bd517b..7320e3241e4a6d946f76a16df9c7082d191d8bce 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 56b0bd8f3b3b365f9823b908365e1614c918582f..cb906cfba444389bb4e7a833f7c03ed77ac2c962 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 8335d8010a8101f2568c0e33efb1553060b95c51..658a2059dcc5dde776d70af1cfc0493f38c84829 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 d28ec71c076048589dce423f41b8f1c7e1517756..677f97666dcc200d60321584251722a3ae349f5c 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 4b80ee38eb0299f4bb19080e05b418bc85f3f43c..c3130193878046750f897ff4752c4bb3d3c7c5e4 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 b90a328acdce40e2072b300747096c494aaf77b2..b3d4f8ec0fe5c81862c8f3e4edeaccc224a0713b 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 ce5b6138924a4ec190010664cccd43b2184c840a..6937162f08fbe276fa7892d085d7b131d5d508ee 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