digital card fragment coding is finished, testing is pending
This commit is contained in:
@@ -46,7 +46,9 @@ class DigitalCardFragment : Fragment() {
|
|||||||
val originalDate: Date? = originalDateFormat.parse(originalDateStr)
|
val originalDate: Date? = originalDateFormat.parse(originalDateStr)
|
||||||
val desiredDateFormat = SimpleDateFormat("MMM dd, yyyy")
|
val desiredDateFormat = SimpleDateFormat("MMM dd, yyyy")
|
||||||
val formattedDate: String = originalDate?.let { desiredDateFormat.format(it) } ?: "N/A"
|
val formattedDate: String = originalDate?.let { desiredDateFormat.format(it) } ?: "N/A"
|
||||||
|
activity?.runOnUiThread {
|
||||||
|
binding.progressBar.visibility = View.GONE
|
||||||
|
}
|
||||||
binding.name.text = "Name: ${testDetails?.name}"
|
binding.name.text = "Name: ${testDetails?.name}"
|
||||||
binding.dob.text = "DOB: ${testDetails?.birthYear}"
|
binding.dob.text = "DOB: ${testDetails?.birthYear}"
|
||||||
binding.gender.text = "gender: ${testDetails?.gender}"
|
binding.gender.text = "gender: ${testDetails?.gender}"
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
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_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/fragment_container">
|
android:id="@+id/fragment_container">
|
||||||
@@ -83,7 +86,7 @@
|
|||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/userImage"
|
app:layout_constraintTop_toBottomOf="@id/userImage"
|
||||||
tools:text="Name: Mariya" />
|
android:text="Name: Mariya" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -99,8 +102,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/name"
|
app:layout_constraintStart_toEndOf="@+id/name"
|
||||||
app:layout_constraintTop_toBottomOf="@id/name"
|
app:layout_constraintTop_toBottomOf="@id/name"
|
||||||
app:layout_con="@+id/userImage4"
|
android:text="DOB: 1998" />
|
||||||
tools:text="DOB: 1998" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -116,8 +118,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/dob"
|
app:layout_constraintStart_toEndOf="@+id/dob"
|
||||||
app:layout_constraintTop_toBottomOf="@id/dob"
|
app:layout_constraintTop_toBottomOf="@id/dob"
|
||||||
app:layout_con="@+id/userImage4"
|
android:text="gender: female" />
|
||||||
tools:text="gender: female" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -133,8 +134,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/gender"
|
app:layout_constraintStart_toEndOf="@+id/gender"
|
||||||
app:layout_constraintTop_toBottomOf="@id/gender"
|
app:layout_constraintTop_toBottomOf="@id/gender"
|
||||||
app:layout_con="@+id/userImage4"
|
android:text="State: Kerala" />
|
||||||
tools:text="State: Kerala" />
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
||||||
tools:text="ABHA-ID: XXXX-8734" />
|
android:text="ABHA-ID: XXXX-8734" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/blood"
|
android:id="@+id/blood"
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
||||||
tools:text="Blood Group: O +ve" />
|
android:text="Blood Group: O +ve" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/sicklecell"
|
android:id="@+id/sicklecell"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
@@ -185,10 +185,10 @@
|
|||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="50dp"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="10sp"
|
android:textSize="8sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
||||||
tools:text="Sickle-Cell: Normal (HbA)" />
|
android:text="Sickle-Cell: Normal (HbA)" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/issueDate"
|
android:id="@+id/issueDate"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
app:layout_constraintTop_toBottomOf="@id/userImage3"
|
||||||
tools:text="Issue Date: Oct 2,2023" />
|
android:text="Issue Date: Oct 2,2023" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
@@ -239,4 +239,5 @@
|
|||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
||||||
@@ -4,8 +4,8 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.1.1'
|
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||||
classpath 'com.google.gms:google-services:4.3.15'
|
classpath 'com.google.gms:google-services:4.4.0'
|
||||||
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
|
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.1'
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
Reference in New Issue
Block a user