Added Offline Incubation feature
Added testStatus field
This commit is contained in:
@@ -71,6 +71,14 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
|
||||
).parse(userList.incubationTime)!!
|
||||
)
|
||||
}"
|
||||
|
||||
if (userList.testStatus!!) {
|
||||
teststatus.text = view.context.getString(R.string.test_concluded)
|
||||
|
||||
} else {
|
||||
teststatus.text = view.context.getString(R.string.test_pending)
|
||||
}
|
||||
|
||||
userCard.setOnClickListener {
|
||||
if (batLevel < 40) {
|
||||
showWarningToast(R.string.low_battery_warning)
|
||||
|
||||
@@ -48,6 +48,20 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/userID"
|
||||
tools:text="UserID: MohamedKaif" />
|
||||
<TextView
|
||||
android:id="@+id/teststatus"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/title1_1"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:gravity="start"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bloodGroup"
|
||||
tools:text="Test Status: Completed"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
@@ -61,7 +75,7 @@
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bloodGroup"
|
||||
app:layout_constraintTop_toBottomOf="@id/teststatus"
|
||||
tools:text="startedAt: yyyy-MM-dd HH:mm:ss" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user