This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace the current exposure status with a positive result card when …
…test result is positive (#79) * Made submission status card style more cross device friendly Signed-off-by: Kolya Opahle <k.opahle@sap.com> * Added the positive result submission status card Signed-off-by: Kolya Opahle <k.opahle@sap.com> * lint fix * Updated main fragment documentation * Added icon for sharing risk status Signed-off-by: Kolya Opahle <k.opahle@sap.com> * Updated positive result home screen card text and icons Signed-off-by: Kolya Opahle <k.opahle@sap.com>
- Loading branch information
1 parent
fdf0330
commit 1722aff
Showing
10 changed files
with
195 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Corona-Warn-App/src/main/res/drawable/ic_risk_details_share.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="28dp" | ||
android:height="28dp" | ||
android:viewportWidth="28" | ||
android:viewportHeight="28"> | ||
<path | ||
android:fillColor="#ffffff" | ||
android:fillType="nonZero" | ||
android:pathData="M20.4535,12.2791C19.8564,9.2499 17.196,6.9758 14,6.9758c-2.5375,0 -4.7413,1.44 -5.8389,3.5472 -2.6429,0.281 -4.6974,2.5199 -4.6974,5.233 0,2.9063 2.3619,5.2682 5.2682,5.2682L20.1462,21.0242c2.4234,0 4.3901,-1.9668 4.3901,-4.3901 0,-2.318 -1.8,-4.197 -4.0828,-4.355zM15.7561,14.878v3.5121L12.2439,18.3901L12.2439,14.878L9.6099,14.878L13.6927,10.7952c0.1756,-0.1756 0.4478,-0.1756 0.6234,0l4.074,4.0828z" | ||
android:strokeWidth="0.878027" | ||
android:strokeColor="#00000000" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
Corona-Warn-App/src/main/res/layout/include_submission_status_card_positive.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<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.TestResult" /> | ||
|
||
<import type="de.rki.coronawarnapp.risk.RiskLevelConstants" /> | ||
|
||
<variable | ||
name="registerDate" | ||
type="java.util.Date" /> | ||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/submission_status_card_positive" | ||
style="@style/card" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/submission_status_card_positive_container" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<TextView | ||
android:id="@+id/submission_status_card_positive_title" | ||
style="@style/textTitle" | ||
android:layout_width="@dimen/match_constraint" | ||
android:layout_height="wrap_content" | ||
android:text="@string/submission_status_card_positive_result_title" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<include | ||
android:id="@+id/submission_status_card_positive_result_card" | ||
layout="@layout/include_test_result_card" | ||
android:layout_width="match_parent" | ||
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/submission_status_card_positive_title" | ||
app:registerDate="@{registerDate}" | ||
app:testResult="@{TestResult.POSITIVE}" /> | ||
|
||
<TextView | ||
android:id="@+id/submission_status_card_positive_result_subtitle" | ||
style="@style/textSubTitle" | ||
android:layout_width="@dimen/match_constraint" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
android:text="@string/submission_status_card_positive_result_subtitle" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_status_card_positive_result_card" /> | ||
|
||
<include | ||
android:id="@+id/submission_status_card_positive_result_contagious" | ||
layout="@layout/include_risk_details_behavior_row" | ||
android:layout_width="@dimen/match_constraint" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
app:body="@{@string/submission_status_card_positive_result_contagious}" | ||
app:icon="@{@drawable/ic_risk_card_contact_increased}" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_status_card_positive_result_subtitle" | ||
app:riskLevel="@{RiskLevelConstants.INCREASED_RISK}" /> | ||
|
||
<include | ||
android:id="@+id/submission_status_card_positive_result_isolate" | ||
layout="@layout/include_risk_details_behavior_row" | ||
android:layout_width="@dimen/match_constraint" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
app:body="@{@string/submission_status_card_positive_result_isolate}" | ||
app:icon="@{@drawable/ic_risk_details_home}" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_status_card_positive_result_contagious" | ||
app:riskLevel="@{RiskLevelConstants.INCREASED_RISK}" /> | ||
|
||
<include | ||
android:id="@+id/submission_status_card_positive_result_share" | ||
layout="@layout/include_risk_details_behavior_row" | ||
android:layout_width="@dimen/match_constraint" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
app:body="@{@string/submission_status_card_positive_result_share}" | ||
app:icon="@{@drawable/ic_risk_details_share}" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_status_card_positive_result_isolate" | ||
app:riskLevel="@{RiskLevelConstants.INCREASED_RISK}" /> | ||
|
||
<Button | ||
android:id="@+id/submission_status_card_positive_result_show_button" | ||
style="@style/buttonPrimary" | ||
android:layout_width="@dimen/match_constraint" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/spacing_normal" | ||
android:text="@string/submission_status_card_positive_result_show_button" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/submission_status_card_positive_result_share" /> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
Oops, something went wrong.