show text and disable button
This commit is contained in:
@@ -154,6 +154,9 @@ class HemoCubeFragment : Fragment() {
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
binding.btnSubmit.isEnabled = false
|
||||
binding.btnSubmit.isClickable = false
|
||||
}
|
||||
|
||||
private fun listenToHemoCube() {
|
||||
@@ -169,11 +172,15 @@ class HemoCubeFragment : Fragment() {
|
||||
val stringData = String(it)
|
||||
fullReadOutput.append(stringData)
|
||||
|
||||
binding.tvSubtitle4.text = fullReadOutput
|
||||
resultData = fullReadOutput.toString()
|
||||
if (fullReadOutput.contains("#")) {
|
||||
binding.tvSubtitle4.text = fullReadOutput
|
||||
}
|
||||
resultData += fullReadOutput.toString()
|
||||
DataHolder.hemoCubeTestData?.resultData
|
||||
resultRatio = "" // TODO
|
||||
Log.d("Result", data.toString())
|
||||
if (fullReadOutput.contains("#Sample Completed")) {
|
||||
binding.btnSubmit.isEnabled = false
|
||||
binding.btnSubmit.isClickable = false
|
||||
}
|
||||
hemoCubeViewModel.progressBar.postValue(false)
|
||||
}
|
||||
}
|
||||
@@ -210,7 +217,8 @@ class HemoCubeFragment : Fragment() {
|
||||
override fun onUsbError(e: Exception?) {
|
||||
hemoCubeViewModel.progressBar.postValue(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user