digital card fragment coding is finished, testing is pending

This commit is contained in:
Mariya
2023-11-21 13:40:42 +05:30
parent b37d3f1fce
commit e92a80caec
3 changed files with 21 additions and 18 deletions

View File

@@ -46,7 +46,9 @@ class DigitalCardFragment : Fragment() {
val originalDate: Date? = originalDateFormat.parse(originalDateStr)
val desiredDateFormat = SimpleDateFormat("MMM dd, yyyy")
val formattedDate: String = originalDate?.let { desiredDateFormat.format(it) } ?: "N/A"
activity?.runOnUiThread {
binding.progressBar.visibility = View.GONE
}
binding.name.text = "Name: ${testDetails?.name}"
binding.dob.text = "DOB: ${testDetails?.birthYear}"
binding.gender.text = "gender: ${testDetails?.gender}"

View File

@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.hpostesting.presentation.hemocube.DigitalCardFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fragment_container">
@@ -83,7 +86,7 @@
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/userImage"
tools:text="Name: Mariya" />
android:text="Name: Mariya" />
<TextView
@@ -99,8 +102,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/name"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_con="@+id/userImage4"
tools:text="DOB: 1998" />
android:text="DOB: 1998" />
<TextView
@@ -116,8 +118,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/dob"
app:layout_constraintTop_toBottomOf="@id/dob"
app:layout_con="@+id/userImage4"
tools:text="gender: female" />
android:text="gender: female" />
<TextView
@@ -133,8 +134,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/gender"
app:layout_constraintTop_toBottomOf="@id/gender"
app:layout_con="@+id/userImage4"
tools:text="State: Kerala" />
android:text="State: Kerala" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
@@ -161,7 +161,7 @@
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/userImage3"
tools:text="ABHA-ID: XXXX-8734" />
android:text="ABHA-ID: XXXX-8734" />
<TextView
android:id="@+id/blood"
@@ -175,7 +175,7 @@
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/userImage3"
tools:text="Blood Group: O +ve" />
android:text="Blood Group: O +ve" />
<TextView
android:id="@+id/sicklecell"
style="@style/title1_1"
@@ -185,10 +185,10 @@
android:layout_marginTop="50dp"
android:gravity="start"
android:textColor="@color/black"
android:textSize="10sp"
android:textSize="8sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/userImage3"
tools:text="Sickle-Cell: Normal (HbA)" />
android:text="Sickle-Cell: Normal (HbA)" />
<TextView
android:id="@+id/issueDate"
style="@style/title1_1"
@@ -201,7 +201,7 @@
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/userImage3"
tools:text="Issue Date: Oct 2,2023" />
android:text="Issue Date: Oct 2,2023" />
</androidx.cardview.widget.CardView>
@@ -239,4 +239,5 @@
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@@ -4,8 +4,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.1'
}
repositories {
mavenCentral()