Skip to content
Snippets Groups Projects
Commit 2e145daf authored by Rituraj Sambherao's avatar Rituraj Sambherao
Browse files

ui adjustment and pipeline fixes

parent 8cb17a4d
No related branches found
No related tags found
No related merge requests found
......@@ -225,12 +225,13 @@ fun formatRiskActiveTracingDaysInRetentionPeriodLogged(
activeTracingDaysInRetentionPeriod: Long
): String {
val appContext = CoronaWarnApplication.getAppContext()
var periodLoggedString :String =""
if (riskLevelScore == RiskLevelConstants.LOW_LEVEL_RISK || riskLevelScore == RiskLevelConstants.INCREASED_RISK) {
periodLoggedString = appContext.getString(
R.string.risk_details_information_body_period_logged_assessment
).format(activeTracingDaysInRetentionPeriod)
}
var periodLoggedString = ""
if (riskLevelScore == RiskLevelConstants.LOW_LEVEL_RISK ||
riskLevelScore == RiskLevelConstants.INCREASED_RISK) {
periodLoggedString = appContext.getString(
R.string.risk_details_information_body_period_logged_assessment
).format(activeTracingDaysInRetentionPeriod)
}
return periodLoggedString
}
......
......@@ -181,7 +181,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/risk_details_behavior_increased_risk_3"
android:id="@+id/risk_details_period_logged_card"
layout="@layout/include_risk_details_period_logged_card"
android:layout_width="0dp"
android:layout_height="wrap_content"
......@@ -200,7 +200,7 @@
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toBottomOf="@id/risk_details_period_logged_card">
<TextView
android:id="@+id/risk_details_information_headline"
......
......@@ -115,7 +115,7 @@
<include
android:id="@+id/settings_tracing_status_tracing"
layout="@layout/include_risk_details_period_logged_progress"
layout="@layout/include_setting_tracing_period_logged"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
......
......@@ -19,7 +19,6 @@
android:layout_height="match_parent"
android:focusable="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/risk_details_period_logged_layout"
android:layout_width="match_parent"
......@@ -65,13 +64,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/risk_details_period_logged_subtitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/risk_details_period_logged_progress"
layout="@layout/include_risk_details_period_logged_progress"
android:layout_width="0dp"
android:layout_marginTop="@dimen/spacing_normal"
android:layout_height="wrap_content"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -18,56 +18,39 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/risk_details_period_logged_body_notice"
style="@style/body1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:focusable="true"
android:text="@string/risk_details_information_body_period_logged"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:focusable="true"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:id="@+id/risk_details_behavior_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:layout_marginTop="@dimen/spacing_normal"
app:layout_constraintTop_toBottomOf="@id/risk_details_period_logged_body_notice">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/risk_details_behavior_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<de.rki.coronawarnapp.ui.view.CircleProgress
android:id="@+id/risk_details_investigation_period_circle_progress"
android:layout_width="@dimen/spacing_huge"
android:layout_height="@dimen/spacing_huge"
android:importantForAccessibility="no"
app:circleWidth="@dimen/circle_large_width"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:progress="@{tracingViewModel.activeTracingDaysInRetentionPeriod}" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_small"
android:text="@{FormatterRiskHelper.formatRiskActiveTracingDaysInRetentionPeriodLogged(tracingViewModel.riskLevel, tracingViewModel.activeTracingDaysInRetentionPeriod)}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<de.rki.coronawarnapp.ui.view.CircleProgress
android:id="@+id/risk_details_investigation_period_circle_progress"
android:layout_width="@dimen/spacing_huge"
android:layout_height="@dimen/spacing_huge"
android:importantForAccessibility="no"
app:circleWidth="@dimen/circle_large_width"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/risk_details_behavior_icon"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:progress="@{tracingViewModel.activeTracingDaysInRetentionPeriod}" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
style="@style/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_small"
android:text="@{FormatterRiskHelper.formatRiskActiveTracingDaysInRetentionPeriodLogged(tracingViewModel.riskLevel, tracingViewModel.activeTracingDaysInRetentionPeriod)}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/risk_details_behavior_icon"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
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.util.formatter.FormatterRiskHelper" />
<variable
name="riskLevel"
type="Integer" />
<variable
name="tracingViewModel"
type="de.rki.coronawarnapp.ui.viewmodel.TracingViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/risk_details_period_logged_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_tiny"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/risk_details_period_logged_body_notice"
style="@style/subtitleMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:text="@string/risk_details_information_body_period_logged"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include
android:id="@+id/risk_details_behavior_stay_home"
layout="@layout/include_risk_details_period_logged_progress"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:focusable="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/risk_details_period_logged_layout"
app:riskLevel="@{tracingViewModel.riskLevel}"
app:tracingViewModel="@{tracingViewModel}" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
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