Skip to content
Snippets Groups Projects
Unverified Commit 56e35c7b authored by Fabian-K's avatar Fabian-K Committed by GitHub
Browse files

Static Screens (#229)

* - impressum updated
- privacy statement updated

* - fix indentation/formatting for strings.xml

* - "Rechtliche Hinweise" updated

* - lint fix :man_facepalming:



Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
Co-authored-by: default avatarmarcmuschko <marc.muschko@sap.com>
parent b596a87f
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ package de.rki.coronawarnapp.util.formatter
import android.graphics.drawable.Drawable
import android.view.View
import androidx.annotation.StringRes
import androidx.core.text.HtmlCompat
import de.rki.coronawarnapp.CoronaWarnApplication
import de.rki.coronawarnapp.R
......@@ -115,3 +117,8 @@ fun formatColorIcon(color: Int?): Int {
val appContext = CoronaWarnApplication.getAppContext()
return color ?: appContext.getColor(R.color.colorAccentTintIcon)
}
fun formatStringAsHTML(@StringRes stringRes: Int) = HtmlCompat.fromHtml(
CoronaWarnApplication.getAppContext().getString(stringRes),
HtmlCompat.FROM_HTML_MODE_LEGACY
)
......@@ -2,15 +2,22 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="de.rki.coronawarnapp.util.formatter.FormatterHelper" />
<import type="de.rki.coronawarnapp.R" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- todo font adjustments needed through final styles -->
<include
android:id="@+id/information_legal_header"
layout="@layout/include_header"
android:layout_width="0dp"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
app:icon="@{@drawable/ic_back}"
app:layout_constraintEnd_toEndOf="parent"
......@@ -20,8 +27,8 @@
<ScrollView
style="@style/fadingScrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_width="@dimen/match_constraint"
android:layout_height="@dimen/match_constraint"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom"
app:layout_constraintEnd_toEndOf="parent"
......@@ -32,58 +39,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/information_legal_header_details"
layout="@layout/include_information_details"
android:layout_width="0dp"
<ImageView
android:id="@+id/information_legal_illustration"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
app:headline="@{@string/information_legal_headline}"
app:illustration="@{@drawable/ic_information_illustration_legal}"
app:illustrationDescription="@{@string/information_legal_illustration_description}"
android:contentDescription="@string/information_legal_illustration_description"
android:src="@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_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" />
<TextView
android:id="@+id/text_sample_2"
android:layout_width="0dp"
android:id="@+id/information_legal_body"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
android:text="@string/lorem_ipsum"
android:text="@{FormatterHelper.formatStringAsHTML(R.string.information_legal_body)}"
app:layout_constraintEnd_toStartOf="@+id/guideline_end"
app:layout_constraintStart_toEndOf="@+id/guideline_start"
app:layout_constraintTop_toBottomOf="@+id/text_sample_1" />
app:layout_constraintTop_toBottomOf="@+id/information_legal_illustration" />
<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" />
<include layout="@layout/merge_guidelines_side" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -2,15 +2,22 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="de.rki.coronawarnapp.util.formatter.FormatterHelper" />
<import type="de.rki.coronawarnapp.R" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- todo font adjustments needed through final styles -->
<include
android:id="@+id/information_privacy_header"
layout="@layout/include_header"
android:layout_width="0dp"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
app:icon="@{@drawable/ic_back}"
app:layout_constraintEnd_toEndOf="parent"
......@@ -20,8 +27,8 @@
<ScrollView
style="@style/fadingScrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_width="@dimen/match_constraint"
android:layout_height="@dimen/match_constraint"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom"
app:layout_constraintEnd_toEndOf="parent"
......@@ -32,58 +39,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/information_privacy_header_details"
layout="@layout/include_information_details"
android:layout_width="0dp"
<ImageView
android:id="@+id/information_privacy_illustration"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
app:headline="@{@string/information_privacy_headline}"
app:illustration="@{@drawable/ic_illustration_privacy}"
app:illustrationDescription="@{@string/information_privacy_illustration_description}"
android:contentDescription="@string/information_privacy_illustration_description"
android:src="@drawable/ic_illustration_privacy"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<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" />
<TextView
android:id="@+id/text_sample_2"
android:layout_width="0dp"
android:id="@+id/information_privacy_body"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
android:text="@string/lorem_ipsum"
android:text="@{FormatterHelper.formatStringAsHTML(R.string.information_privacy_body)}"
app:layout_constraintEnd_toStartOf="@+id/guideline_end"
app:layout_constraintStart_toEndOf="@+id/guideline_start"
app:layout_constraintTop_toBottomOf="@+id/text_sample_1" />
app:layout_constraintTop_toBottomOf="@+id/information_privacy_illustration" />
<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" />
<include layout="@layout/merge_guidelines_side" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -2,15 +2,22 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="de.rki.coronawarnapp.util.formatter.FormatterHelper" />
<import type="de.rki.coronawarnapp.R" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- todo font adjustments needed through final styles -->
<include
android:id="@+id/information_technical_header"
layout="@layout/include_header"
android:layout_width="0dp"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
app:icon="@{@drawable/ic_back}"
app:layout_constraintEnd_toEndOf="parent"
......@@ -20,8 +27,8 @@
<ScrollView
style="@style/fadingScrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_width="@dimen/match_constraint"
android:layout_height="@dimen/match_constraint"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="@+id/guideline_bottom"
app:layout_constraintEnd_toEndOf="parent"
......@@ -32,58 +39,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/information_technical_header_details"
layout="@layout/include_information_details"
android:layout_width="0dp"
<ImageView
android:id="@+id/information_technical_illustration"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
app:headline="@{@string/information_technical_headline}"
app:illustration="@{@drawable/ic_information_illustration_technical}"
app:illustrationDescription="@{@string/information_technical_illustration_description}"
android:contentDescription="@string/information_technical_illustration_description"
android:src="@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_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" />
<TextView
android:id="@+id/text_sample_2"
android:layout_width="0dp"
android:id="@+id/information_technical_body"
android:layout_width="@dimen/match_constraint"
android:layout_height="wrap_content"
android:text="@string/lorem_ipsum"
android:text="@{FormatterHelper.formatStringAsHTML(R.string.information_technical_body)}"
app:layout_constraintEnd_toStartOf="@+id/guideline_end"
app:layout_constraintStart_toEndOf="@+id/guideline_start"
app:layout_constraintTop_toBottomOf="@+id/text_sample_1" />
app:layout_constraintTop_toBottomOf="@+id/information_technical_illustration" />
<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" />
<include layout="@layout/merge_guidelines_side" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -2,6 +2,14 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="de.rki.coronawarnapp.util.formatter.FormatterHelper" />
<import type="de.rki.coronawarnapp.R" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -21,8 +29,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/spacing_normal"
app:body="@{@string/onboarding_privacy_body}"
app:bodyEmphasized="@{@string/onboarding_privacy_body_emphasized}"
app:body="@{FormatterHelper.formatStringAsHTML(R.string.onboarding_privacy_body)}"
app:headline="@{@string/onboarding_privacy_headline}"
app:illustration="@{@drawable/ic_illustration_privacy}"
app:illustrationDescription="@{@string/onboarding_privacy_illustration_description}"
......
......@@ -25,7 +25,7 @@
<variable
name="body"
type="String" />
type="CharSequence" />
<variable
name="bodyEmphasized"
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment