code cleanup.
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
package com.example.refactoredapp
|
||||
|
||||
import android.app.Application
|
||||
import android.graphics.Color
|
||||
import android.graphics.PorterDuff
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
import com.example.refactoredapp.data.model.SampleDetails
|
||||
|
||||
class MyApplication : Application() {
|
||||
|
||||
private val sampleDetails = SampleDetails("Change it later");
|
||||
fun getSampleDetails() : SampleDetails = sampleDetails
|
||||
// private val sampleDetails = PatientDetails("Change it later");
|
||||
// fun getSampleDetails() : PatientDetails = sampleDetails
|
||||
// fun setSampleDetails(sample: SampleDetails) {sampleDetails = sample}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ object Constants {
|
||||
const val WRITE_TIMEOUT_MILLIS = 60000 // 1 min
|
||||
const val READ_TIMEOUT_MILLIS = 60000 // 1 min
|
||||
|
||||
// const val TEST_RIGHT_TOTAL_PIXEL = 3694
|
||||
const val TEST_RIGHT_TOTAL_PIXEL = 12
|
||||
const val TEST_RIGHT_TOTAL_PIXEL = 3694
|
||||
// const val TEST_RIGHT_TOTAL_PIXEL = 12
|
||||
|
||||
const val MAXIMUM_TEST_ALLOWED_BEFORE_REFERENCE = 10
|
||||
}
|
||||
@@ -4,5 +4,5 @@ object DataHolder {
|
||||
var isStoragePermissionGranted = false
|
||||
var isAppFolderCreated = false
|
||||
|
||||
var isReferenceTaken = false
|
||||
// var isReferenceTaken = false
|
||||
}
|
||||
@@ -5,11 +5,11 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.data.model.SampleDetails
|
||||
import com.example.refactoredapp.data.model.PatientData
|
||||
|
||||
class RVAdapter : RecyclerView.Adapter<RVAdapter.ViewHolder>() {
|
||||
|
||||
private val dataset = ArrayList<SampleDetails>()
|
||||
private val dataset = ArrayList<PatientData>()
|
||||
|
||||
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
@@ -30,7 +30,7 @@ class RVAdapter : RecyclerView.Adapter<RVAdapter.ViewHolder>() {
|
||||
return dataset.size
|
||||
}
|
||||
|
||||
fun updateDataSet(newDataSet: ArrayList<SampleDetails>) {
|
||||
fun updateDataSet(newDataSet: ArrayList<PatientData>) {
|
||||
dataset.clear()
|
||||
dataset.addAll(newDataSet)
|
||||
notifyDataSetChanged()
|
||||
|
||||
Reference in New Issue
Block a user