Compare commits

..

5 Commits

16 changed files with 365 additions and 312 deletions

1
.idea/misc.xml generated
View File

@@ -19,6 +19,7 @@
<entry key="app/src/main/res/layout/activity_main.xml" value="0.165" /> <entry key="app/src/main/res/layout/activity_main.xml" value="0.165" />
<entry key="app/src/main/res/layout/activity_splash.xml" value="0.24375" /> <entry key="app/src/main/res/layout/activity_splash.xml" value="0.24375" />
<entry key="app/src/main/res/layout/activity_test_right.xml" value="0.24375" /> <entry key="app/src/main/res/layout/activity_test_right.xml" value="0.24375" />
<entry key="app/src/main/res/layout/fragment_graph.xml" value="0.19791666666666666" />
<entry key="app/src/main/res/layout/fragment_test_right_exp_reference.xml" value="0.25" /> <entry key="app/src/main/res/layout/fragment_test_right_exp_reference.xml" value="0.25" />
<entry key="app/src/main/res/layout/fragment_test_right_exp_sample.xml" value="0.25" /> <entry key="app/src/main/res/layout/fragment_test_right_exp_sample.xml" value="0.25" />
<entry key="app/src/main/res/layout/fragment_test_right_process.xml" value="0.24375" /> <entry key="app/src/main/res/layout/fragment_test_right_process.xml" value="0.24375" />

View File

@@ -56,6 +56,8 @@ dependencies {
implementation 'com.opencsv:opencsv:4.6' implementation 'com.opencsv:opencsv:4.6'
// For the Graph
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
// implementation 'androidx.appcompat:appcompat:1.1.0' // implementation 'androidx.appcompat:appcompat:1.1.0'
// implementation "androidx.core:core-ktx:+" // implementation "androidx.core:core-ktx:+"
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

View File

@@ -10,12 +10,9 @@ import android.os.Bundle
import android.util.Log import android.util.Log
import android.view.Gravity import android.view.Gravity
import android.view.Menu import android.view.Menu
import android.view.MenuItem
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.view.GravityCompat
import androidx.core.view.get import androidx.core.view.get
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import com.example.hpos.R import com.example.hpos.R
@@ -62,8 +59,7 @@ class MainActivity : AppCompatActivity()
)[MainViewModel::class.java] )[MainViewModel::class.java]
setSupportActionBar(binding.myToolbar) setSupportActionBar(binding.myToolbar)
// supportActionBar?.setDisplayHomeAsUpEnabled(true)
setupNavigationDrawer()
setupListeners() setupListeners()
@@ -73,39 +69,6 @@ class MainActivity : AppCompatActivity()
registerReceiver(mUsbReceiver, filter) registerReceiver(mUsbReceiver, filter)
} }
private fun setupNavigationDrawer() {
// Pass the ActionBarToggle action into the drawerListener
val actionBarToggle = ActionBarDrawerToggle(this, binding.drawerLayout, 0, 0)
binding.drawerLayout.addDrawerListener(actionBarToggle)
// For the Navigation drawer
supportActionBar?.setDisplayHomeAsUpEnabled(true)
// Call syncState() on the action bar so it'll automatically change to the back button when the drawer layout is open
actionBarToggle.syncState()
// Call setNavigationItemSelectedListener on the NavigationView to detect when items are clicked
binding.navView.setNavigationItemSelectedListener { menuItem: MenuItem ->
when (menuItem.itemId) {
R.id.about_us -> {
Toast.makeText(this, "Test clicked", Toast.LENGTH_SHORT).show()
true
}
R.id.download_report -> {
Toast.makeText(this, "Download clicked", Toast.LENGTH_SHORT).show()
true
}
R.id.settings -> {
Toast.makeText(this, "Settings clicked", Toast.LENGTH_SHORT).show()
true
}
else -> {
false
}
}
}
}
private fun checkAndUpdateUsbConnection() { private fun checkAndUpdateUsbConnection() {
val availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(getSystemService(Context.USB_SERVICE) as UsbManager) val availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(getSystemService(Context.USB_SERVICE) as UsbManager)
if (availableDrivers.isNotEmpty() && availableDrivers[0].device.productId == Constants.DEVICE_PRODUCT_ID && availableDrivers[0].device.vendorId == Constants.DEVICE_VENDOR_ID){ if (availableDrivers.isNotEmpty() && availableDrivers[0].device.productId == Constants.DEVICE_PRODUCT_ID && availableDrivers[0].device.vendorId == Constants.DEVICE_VENDOR_ID){
@@ -153,19 +116,4 @@ class MainActivity : AppCompatActivity()
return true return true
} }
// override the onSupportNavigateUp() function to launch the Drawer when the hamburger icon is clicked
override fun onSupportNavigateUp(): Boolean {
binding.drawerLayout.openDrawer(binding.navView)
return true
}
// override the onBackPressed() function to close the Drawer when the back button is clicked
override fun onBackPressed() {
if (binding.drawerLayout.isDrawerOpen(GravityCompat.START)) {
binding.drawerLayout.closeDrawer(GravityCompat.START)
} else {
super.onBackPressed()
}
}
} }

View File

@@ -0,0 +1,102 @@
package com.example.hpos.presentation.testRight
import android.os.Bundle
import android.util.Log
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.activity.OnBackPressedCallback
import androidx.fragment.app.activityViewModels
import com.example.hpos.R
import com.example.hpos.databinding.FragmentGraphBinding
import com.github.mikephil.charting.animation.Easing
import com.github.mikephil.charting.data.Entry
import com.github.mikephil.charting.data.LineData
import com.github.mikephil.charting.data.LineDataSet
class GraphFragment : Fragment() {
private lateinit var binding: FragmentGraphBinding
private val viewModel: TestRightViewModel by activityViewModels()
private val TAG = "GraphFragment"
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View {
// Inflate the layout for this fragment
binding = FragmentGraphBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
setLineChartData()
// setLineChartDataTest()
activity?.onBackPressedDispatcher?.addCallback(viewLifecycleOwner, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
parentFragmentManager.beginTransaction().replace(R.id.fl_main, TestRightResults()).commit()
}
})
}
private fun setLineChartData() {
val linevalues = ArrayList<Entry>()
Log.d(TAG, "SIZE = ${viewModel.wavelengthToAbsorbance.size}")
for (each in viewModel.wavelengthToAbsorbance) {
Log.d(TAG, each[0].toString())
// if (each[0] in 350.0..751.0) {
linevalues.add(Entry(each[0].toFloat(), each[1].toFloat()))
// }
}
val lineDataSet = LineDataSet(linevalues, "Wavelength -> Absorbance")
//We add features to our chart
lineDataSet.color = resources.getColor(R.color.blue_app)
lineDataSet.fillColor = resources.getColor(R.color.blue_app)
lineDataSet.setDrawFilled(true)
lineDataSet.mode = LineDataSet.Mode.CUBIC_BEZIER
lineDataSet.setDrawCircles(false)
//We connect our data to the UI Screen
val data = LineData(lineDataSet)
binding.getTheGraph.setBackgroundColor(resources.getColor(R.color.white))
binding.getTheGraph.animateXY(1000, 1000, Easing.EaseInCubic)
binding.getTheGraph.data = data
binding.getTheGraph.notifyDataSetChanged()
binding.getTheGraph.invalidate()
}
// private fun setLineChartDataTest() {
// val linevalues = ArrayList<Entry>()
// var y = 0.1f
// for (each in 350..555) {
// linevalues.add(Entry(each.toFloat(), y))
// y += 0.1f
// }
// for (each in 556..800) {
// linevalues.add(Entry(each.toFloat(), y))
// y -= 0.1f
// }
//
// val lineDataSet = LineDataSet(linevalues, "HPOS")
//
// lineDataSet.mode = LineDataSet.Mode.LINEAR;
//// lineDataSet.mode = LineDataSet.Mode.CUBIC_BEZIER
//
// lineDataSet.setDrawFilled(true)
// lineDataSet.fillColor = resources.getColor(R.color.blue_app)
//
// val data = LineData(lineDataSet)
// binding.getTheGraph.data = data
// binding.getTheGraph.invalidate()
// }
}

View File

@@ -110,7 +110,13 @@ class TestRightActivity : AppCompatActivity() {
val availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(manager) val availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(manager)
if (availableDrivers.isEmpty()) { if (availableDrivers.isEmpty()) {
// Todo: To Add
onErrorReported("No Device is Connected") onErrorReported("No Device is Connected")
// Todo: To remove
// supportFragmentManager.beginTransaction()
// .replace(binding.flMain.id, GraphFragment()).commit()
} else { } else {
mDriver = availableDrivers[0] mDriver = availableDrivers[0]

View File

@@ -74,7 +74,7 @@ class TestRightExpSample : Fragment() {
} }
binding.btnSubmit.setOnClickListener { binding.btnSubmit.setOnClickListener {
val details = checkAndReturnPatientDetails() val details = validateAndReturnPatientData()
if (details != null) { if (details != null) {
viewModel.patientDetails = details viewModel.patientDetails = details
@@ -97,12 +97,19 @@ class TestRightExpSample : Fragment() {
binding.etGenderBlock.setOnClickListener { binding.ddGender.isErrorEnabled = false } binding.etGenderBlock.setOnClickListener { binding.ddGender.isErrorEnabled = false }
} }
private fun checkAndReturnPatientDetails(): PatientData? { private fun validateAndReturnPatientData(): PatientData? {
val name = binding.etName.editText?.text?.trim() val name = binding.etName.editText?.text?.trim()
if (name.isNullOrEmpty()) { if (name.isNullOrEmpty()) {
binding.etName.error = getString(R.string.name_error) binding.etName.error = getString(R.string.name_error)
return null return null
} else {
val regex = Regex("[|\\\\?*<\":>+\\[\\]'/]")
if (regex.containsMatchIn(name)){
binding.etName.error = getString(R.string.name_error_2)
return null
}
} }
val age = binding.etAge.editText?.text?.trim() val age = binding.etAge.editText?.text?.trim()
if (age.isNullOrEmpty()) { if (age.isNullOrEmpty()) {
binding.etAge.error = getString(R.string.age_error) binding.etAge.error = getString(R.string.age_error)

View File

@@ -53,6 +53,11 @@ class TestRightResults : Fragment() {
binding.ivNext.setOnClickListener { binding.ivNext.setOnClickListener {
moveToSamplePage() moveToSamplePage()
} }
binding.ivGraph.setOnClickListener {
parentFragmentManager.beginTransaction()
.replace(R.id.fl_main, GraphFragment())
.commit()
}
} }
fun moveToSamplePage() { fun moveToSamplePage() {

View File

@@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="48dp"
android:tint="#219AD6" android:viewportHeight="24"
android:viewportWidth="24" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M14.06,9.94L12,9l2.06,-0.94L15,6l0.94,2.06L18,9l-2.06,0.94L15,12L14.06,9.94zM4,14l0.94,-2.06L7,11l-2.06,-0.94L4,8l-0.94,2.06L1,11l2.06,0.94L4,14zM8.5,9l1.09,-2.41L12,5.5L9.59,4.41L8.5,2L7.41,4.41L5,5.5l2.41,1.09L8.5,9zM4.5,20.5l6,-6.01l4,4L23,8.93l-1.41,-1.41l-7.09,7.97l-4,-4L3,19L4.5,20.5z"/>
</vector>

View File

@@ -1,5 +0,0 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#000000" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>

View File

@@ -1,5 +0,0 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#000000" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
</vector>

View File

@@ -4,222 +4,206 @@
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">
<androidx.drawerlayout.widget.DrawerLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/drawerLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
tools:context=".MainActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:titleTextColor="#FFFFFF"
android:elevation="4dp"
app:menu="@menu/my_menu"
android:theme="@style/ToolbarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/tv_title"
style="@style/title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:text="@string/select_the_test"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_toolbar" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item1"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
app:cardElevation="8dp"
app:layout_constraintEnd_toStartOf="@id/cv_item2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item1"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sickle_cert"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item1" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item2"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:cardElevation="8dp"
app:layout_constraintBottom_toBottomOf="@+id/cv_item1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/cv_item1"
app:layout_constraintTop_toTopOf="@+id/cv_item1" >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar <ImageView
android:id="@+id/my_toolbar" android:id="@+id/iv_image_item2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="wrap_content"
android:background="?attr/colorPrimary" android:scaleType="centerInside"
android:elevation="4dp" android:src="@drawable/ic_baseline_blur_on_24"
android:theme="@style/ToolbarTheme" app:layout_constraintBottom_toTopOf="@id/tv_title_item2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:menu="@menu/my_menu"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextColor="#FFFFFF" />
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title_item2"
style="@style/title1" style="@style/title2_5"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="24dp" android:text="@string/sickle_find"
android:text="@string/select_the_test" android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/my_toolbar" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item1"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
app:cardElevation="8dp"
app:layout_constraintEnd_toStartOf="@id/cv_item2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item1"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sickle_cert"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item1" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item2"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:cardElevation="8dp"
app:layout_constraintBottom_toBottomOf="@+id/cv_item1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/cv_item1"
app:layout_constraintTop_toTopOf="@+id/cv_item1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item2"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sickle_find"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item3"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
app:cardElevation="8dp"
app:layout_constraintEnd_toStartOf="@id/cv_item4"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cv_item1"> app:layout_constraintTop_toBottomOf="@id/iv_image_item2" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item3"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hb"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item3" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item4"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:cardElevation="8dp"
app:layout_constraintBottom_toBottomOf="@id/cv_item3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/cv_item3"
app:layout_constraintTop_toTopOf="@id/cv_item3">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item4"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/thalassemia"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item4" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.navigation.NavigationView </com.google.android.material.card.MaterialCardView>
android:id="@+id/navView"
android:layout_width="wrap_content" <com.google.android.material.card.MaterialCardView
android:layout_height="match_parent" android:id="@+id/cv_item3"
android:layout_gravity="start" android:layout_width="128dp"
app:menu="@menu/drawer_list" android:layout_height="128dp"
android:layout_marginTop="?actionBarSize" android:layout_marginTop="32dp"
app:headerLayout="@layout/nav_header"/> android:layout_marginStart="16dp"
app:cardElevation="8dp"
app:layout_constraintEnd_toStartOf="@id/cv_item4"
app:layout_constraintTop_toBottomOf="@id/cv_item1"
app:layout_constraintStart_toStartOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item3"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hb"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item3" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_item4"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:cardElevation="8dp"
app:layout_constraintTop_toTopOf="@id/cv_item3"
app:layout_constraintBottom_toBottomOf="@id/cv_item3"
app:layout_constraintStart_toEndOf="@id/cv_item3"
app:layout_constraintEnd_toEndOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_image_item4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_baseline_blur_on_24"
app:layout_constraintBottom_toTopOf="@id/tv_title_item4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title_item4"
style="@style/title2_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/thalassemia"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_image_item4" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</layout> </layout>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".presentation.testRight.GraphFragment">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/getTheGraph"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="52dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@@ -190,7 +190,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:src="@drawable/ic_baseline_home_24" android:src="@drawable/ic_baseline_home_24"
app:layout_constraintStart_toStartOf="@id/cv_sample_details" app:layout_constraintStart_toStartOf="@id/cv_sample_details"
app:layout_constraintEnd_toStartOf="@id/iv_next" app:layout_constraintEnd_toStartOf="@id/iv_graph"
app:layout_constraintTop_toBottomOf="@id/cv_sample_details" /> app:layout_constraintTop_toBottomOf="@id/cv_sample_details" />
<TextView <TextView
@@ -206,14 +206,37 @@
app:layout_constraintTop_toBottomOf="@id/iv_home" /> app:layout_constraintTop_toBottomOf="@id/iv_home" />
<ImageView <ImageView
android:id="@+id/iv_next" android:id="@+id/iv_graph"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="42dp" android:layout_marginTop="42dp"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:src="@drawable/ic_baseline_auto_graph_24"
app:layout_constraintStart_toEndOf="@id/iv_home"
app:layout_constraintEnd_toStartOf="@id/iv_next"
app:layout_constraintTop_toBottomOf="@id/cv_sample_details" />
<TextView
style="@style/title3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="View\nSpectrum"
android:textAlignment="center"
android:textColor="@color/gray"
app:layout_constraintEnd_toEndOf="@id/iv_graph"
app:layout_constraintStart_toStartOf="@id/iv_graph"
app:layout_constraintTop_toBottomOf="@id/iv_graph" />
<ImageView
android:id="@+id/iv_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="42dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:src="@drawable/ic_baseline_new_label_24" android:src="@drawable/ic_baseline_new_label_24"
app:layout_constraintStart_toEndOf="@id/iv_home" app:layout_constraintStart_toEndOf="@id/iv_graph"
app:layout_constraintEnd_toEndOf="@id/cv_sample_details" app:layout_constraintEnd_toEndOf="@id/cv_sample_details"
app:layout_constraintTop_toBottomOf="@id/cv_sample_details" /> app:layout_constraintTop_toBottomOf="@id/cv_sample_details" />

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/navConstraint"
android:layout_width="match_parent"
android:layout_height="200dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/headerImage"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/hpos_icon_foreground" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/about_us"
android:icon="@drawable/ic_baseline_info_24"
android:title="@string/about_us" />
<item
android:id="@+id/download_report"
android:icon="@drawable/ic_baseline_file_download_24"
android:title="@string/download_report" />
<item
android:id="@+id/settings"
android:icon="@drawable/ic_baseline_settings_24"
android:title="@string/settings" />
</menu>

View File

@@ -33,7 +33,6 @@
<string name="yes_and_run">Yes, Run</string> <string name="yes_and_run">Yes, Run</string>
<!-- Instructions Text --> <!-- Instructions Text -->
<string name="Instructions">Instructions</string> <string name="Instructions">Instructions</string>
<string name="step1"><b><u>Step 1</u> : </b> Place the cuvette containing reference/baseline sample for referencing.</string> <string name="step1"><b><u>Step 1</u> : </b> Place the cuvette containing reference/baseline sample for referencing.</string>
@@ -60,7 +59,7 @@
<string name="age_in_textview"><b>Age</b> : %1$s years</string> <string name="age_in_textview"><b>Age</b> : %1$s years</string>
<string name="results_in_textview"><b>Results</b> :</string> <string name="results_in_textview"><b>Results</b> :</string>
<string name="negative">Negative\ \ </string> <string name="negative">Negative\ \ </string>
<string name="download_report">Download Report</string> <string name="download_report">Download\nReport</string>
<string name="home">Home</string> <string name="home">Home</string>
<string name="new_test">New Test</string> <string name="new_test">New Test</string>
<string name="start_now">Start Now</string> <string name="start_now">Start Now</string>
@@ -78,9 +77,6 @@
<string name="sickle_cert">Sickle Cert</string> <string name="sickle_cert">Sickle Cert</string>
<string name="sickle_find">Sickle Find</string> <string name="sickle_find">Sickle Find</string>
<string name="submit">Submit</string> <string name="submit">Submit</string>
<string name="name_error_2">Invalid character, Allowed characters are Letters, Numbers and ( ) _ - , . only</string>
<!-- Navigation Drawer -->
<string name="about_us">About Us</string>
<string name="settings">Settings</string>
</resources> </resources>