Skip to content
Snippets Groups Projects
Unverified Commit 974154b1 authored by Mohamed's avatar Mohamed Committed by GitHub
Browse files

Align Check-Ins , Locations dates (EXPOSUREAPP-6297) - (EXPOSUREAPP-6268) (#2809)


* Adjust design for check-in items

* Adjust date in trace locations

* Update trace_location_organizer_trace_locations_item.xml

* Formatting

* lint

* Change default

* Create new key to fix failure

Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
parent d43c92be
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,6 @@ import org.joda.time.Duration
import org.joda.time.DurationFieldType
import org.joda.time.Instant
import org.joda.time.PeriodType
import org.joda.time.format.DateTimeFormat
import org.joda.time.format.PeriodFormat
import org.joda.time.format.PeriodFormatterBuilder
......@@ -50,8 +49,6 @@ class ActiveCheckInVH(parent: ViewGroup) :
description.text = curItem.checkin.description
address.text = curItem.checkin.address
val startDate = checkInStartUserTZ.toLocalDate()
traceLocationCardHighlightView.setCaption(startDate.toString(DateTimeFormat.mediumDate()))
checkoutInfo.text = run {
val checkoutIn = Duration(curItem.checkin.checkInStart, curItem.checkin.checkInEnd).let {
......@@ -65,8 +62,10 @@ class ActiveCheckInVH(parent: ViewGroup) :
it.toPeriod(periodType)
}
val startDate = checkInStartUserTZ.toLocalDate()
context.getString(
R.string.trace_location_checkins_card_automatic_checkout_info,
R.string.trace_location_checkins_card_automatic_checkout_info_format,
startDate.toString("dd.MM.yy"),
checkInStartUserTZ.toLocalTime().toString("HH:mm"),
hourPeriodFormatter.print(checkoutIn)
)
......
......@@ -35,11 +35,11 @@ class TraceLocationVH(parent: ViewGroup) :
duration.isGone = false
duration.text = if (startTime.toLocalDate() == endTime.toLocalDate()) {
icon.setCaption(startTime.toString("dd.MM.yy"))
context.getString(
R.string.trace_location_organizer_list_item_duration,
startTime.toLocalTime().toString("HH:mm"),
endTime.toLocalTime().toString("HH:mm")
R.string.trace_location_organizer_list_item_duration_same_day,
startTime.toString("dd.MM.yy"),
startTime.toString("HH:mm"),
endTime.toString("HH:mm")
)
} else {
icon.setCaption(null)
......
......@@ -5,8 +5,8 @@
style="@style/contactDiaryCardRipple"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp"
android:focusable="true">
<de.rki.coronawarnapp.ui.eventregistration.common.TraceLocationCardHighlightView
......@@ -17,10 +17,8 @@
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/checkout_action"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="21.01.2021">
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/highlight_duration_label"
......@@ -38,6 +36,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/highlight_duration"
style="@style/headline5Bold"
......@@ -91,8 +90,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/traceLocationCardHighlightView"
app:layout_constraintTop_toBottomOf="@id/address"
app:layout_constraintVertical_bias="0.0"
tools:text="18:00 - Automatisch auschecken nach 3 Std." />
tools:text="21.01.2021 18:00 - Automatisch auschecken nach 3 Std." />
<ImageButton
android:id="@+id/menu_action"
......
......@@ -17,8 +17,7 @@
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="21.01.2021">
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="42dp"
......
......@@ -43,6 +43,8 @@
<string name="trace_location_checkins_card_highlight_duration_label">Dauer</string>
<!-- XTXT: My check-ins card: Active event, checkin information, automatic checkout info -->
<string name="trace_location_checkins_card_automatic_checkout_info">"%1$s - Automatisch auschecken nach %2$s."</string>
<!-- XTXT: My check-ins card: Active event, checkin information, automatic checkout info -->
<string name="trace_location_checkins_card_automatic_checkout_info_format">"%1$s %2$s - Automatisch auschecken nach %3$s."</string>
<!-- XHED: Title of the category list screen of the event creation -->
<string name="tracelocation_organizer_category_title">QR-Code erstellen</string>
......@@ -198,6 +200,10 @@
<!-- XTXT: Event organiser list item: duration-->
<string name="trace_location_organizer_list_item_duration">"%1$s - %2$s Uhr"</string>
<!-- XTXT: Event organiser list item: duration same day-->
<string name="trace_location_organizer_list_item_duration_same_day">"%1$s %2$s - %3$s Uhr"</string>
<!-- XBUT: Event organiser list item: checkin button -->
<string name="trace_location_organizer_list_item_action_checkin">Selbst einchecken</string>
......
......@@ -42,7 +42,8 @@
<string name="trace_location_checkins_card_highlight_duration_label">"Duration"</string>
<!-- XTXT: My check-ins card: Active event, checkin information, automatic checkout info -->
<string name="trace_location_checkins_card_automatic_checkout_info">"%1$s - check out automatically after %2$s."</string>
<!-- XTXT: My check-ins card: Active event, checkin information, automatic checkout info -->
<string name="trace_location_checkins_card_automatic_checkout_info_format">"%1$s 2$s - check out automatically after %3$s."</string>
<!-- XHED: Title of the category list screen of the event creation -->
<string name="tracelocation_organizer_category_title">"Create QR Code"</string>
......@@ -197,6 +198,10 @@
<!-- XTXT: Event organiser list item: duration-->
<string name="trace_location_organizer_list_item_duration">"%1$s - %2$s"</string>
<!-- XTXT: Event organiser list item: duration same day-->
<string name="trace_location_organizer_list_item_duration_same_day">"%1$s 2$s - %3$s"</string>
<!-- XBUT: Event organiser list item: checkin button -->
<string name="trace_location_organizer_list_item_action_checkin">"Check In"</string>
......
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