setup of the basic structure of the project with boiler plate code
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
|
||||
10
.idea/misc.xml
generated
10
.idea/misc.xml
generated
@@ -3,7 +3,15 @@
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.22916666666666666" />
|
||||
<entry key="app/src/main/res/font/inter_bold.xml" value="0.33487179487179486" />
|
||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.25" />
|
||||
<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/fragment_test_right_exp_reference.xml" value="0.2972222222222222" />
|
||||
<entry key="app/src/main/res/layout/fragment_test_right_exp_sample.xml" value="0.2296875" />
|
||||
<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_results.xml" value="0.2972222222222222" />
|
||||
<entry key="app/src/main/res/layout/table_item.xml" value="0.22407407407407406" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -43,4 +43,11 @@ dependencies {
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
|
||||
implementation 'com.opencsv:opencsv:4.6'
|
||||
implementation 'com.github.mik3y:usb-serial-for-android:3.4.6'
|
||||
|
||||
implementation "androidx.fragment:fragment-ktx:1.5.5"
|
||||
|
||||
}
|
||||
@@ -3,6 +3,10 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.example.refactoredapp">
|
||||
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
@@ -13,14 +17,33 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.RefactoredApp"
|
||||
tools:targetApi="31">
|
||||
<service
|
||||
android:name=".UsbService"
|
||||
android:enabled="true"
|
||||
android:exported="true"></service>
|
||||
|
||||
<activity
|
||||
android:name=".presentation.SplashActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".presentation.TestRight.TestRightActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".presentation.MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
|
||||
android:resource="@xml/device_filter" />
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
|
||||
11
app/src/main/java/com/example/refactoredapp/MyApplication.kt
Normal file
11
app/src/main/java/com/example/refactoredapp/MyApplication.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.example.refactoredapp
|
||||
|
||||
import android.app.Application
|
||||
import com.example.refactoredapp.data.model.SampleDetails
|
||||
|
||||
class MyApplication : Application() {
|
||||
|
||||
private val sampleDetails = SampleDetails("Change it later");
|
||||
fun getSampleDetails() : SampleDetails = sampleDetails
|
||||
// fun setSampleDetails(sample: SampleDetails) {sampleDetails = sample}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.example.refactoredapp.data
|
||||
|
||||
object Constants {
|
||||
const val ACTION_USB_PERMISSION = "shanmukha.in.sickle_cell.USB_PERMISSION"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.example.refactoredapp.data
|
||||
|
||||
object DataHolder {
|
||||
var isStoragePermissionGranted = false
|
||||
var isAppFolderCreated = false
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.example.refactoredapp.data
|
||||
|
||||
import com.example.refactoredapp.data.model.TestInfo
|
||||
import java.io.File
|
||||
|
||||
interface Repository {
|
||||
suspend fun saveToDatabase(info: TestInfo)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.example.refactoredapp.data
|
||||
|
||||
import com.example.refactoredapp.data.model.TestInfo
|
||||
|
||||
class RepositoryImpl : Repository {
|
||||
|
||||
override suspend fun saveToDatabase(info: TestInfo) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.example.refactoredapp.data.model
|
||||
|
||||
data class DenovixData(
|
||||
val serialNumber: Int,
|
||||
val nameSample: String,
|
||||
val ratio: Double,
|
||||
val result: String
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.example.refactoredapp.data.model
|
||||
|
||||
enum class DeviceType {
|
||||
Denovix,
|
||||
TestRight
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.example.refactoredapp.data.model
|
||||
|
||||
data class SampleDetails(
|
||||
val sampleName: String
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.example.refactoredapp.data.model
|
||||
|
||||
data class TestInfo(
|
||||
val value: String,
|
||||
val number1: String,
|
||||
val number2: String,
|
||||
val device: DeviceType,
|
||||
val result: String,
|
||||
val resultConfirmatory: String,
|
||||
val directoryPath: String,
|
||||
val fullPath: String
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.example.refactoredapp.domain
|
||||
|
||||
import java.io.File
|
||||
|
||||
interface ParseCSV {
|
||||
fun parseCSV(file: File)
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.example.refactoredapp.domain
|
||||
|
||||
import com.opencsv.CSVReader
|
||||
import java.io.*
|
||||
|
||||
class ParseDenovixUseCase : ParseCSV {
|
||||
|
||||
override fun parseCSV(file: File) {
|
||||
val reader = CSVReader(FileReader(file))
|
||||
var line: Array<String?>
|
||||
val inputStream: InputStream = FileInputStream(file)
|
||||
val br = BufferedReader(InputStreamReader(inputStream))
|
||||
val header: Array<String> = reader.readNext()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.example.refactoredapp.domain
|
||||
|
||||
import com.opencsv.CSVReader
|
||||
import java.io.*
|
||||
|
||||
class ParseTestRightCSVUseCase : ParseCSV {
|
||||
|
||||
override fun parseCSV(file: File){
|
||||
val reader = CSVReader(FileReader(file))
|
||||
var line: Array<String?>
|
||||
val inputStream: InputStream = FileInputStream(file)
|
||||
val br = BufferedReader(InputStreamReader(inputStream))
|
||||
val header: Array<String> = reader.readNext()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,49 +1,162 @@
|
||||
package com.example.refactoredapp.presentation
|
||||
|
||||
import android.Manifest
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.hardware.usb.UsbDevice
|
||||
import android.hardware.usb.UsbManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.data.Constants
|
||||
import com.example.refactoredapp.databinding.ActivityMainBinding
|
||||
import com.example.refactoredapp.presentation.TestRight.TestRightActivity
|
||||
import com.example.refactoredapp.util.MyUtils
|
||||
import com.example.refactoredapp.util.MyViewModelFactory
|
||||
import com.hoho.android.usbserial.driver.UsbSerialDriver
|
||||
import com.hoho.android.usbserial.driver.UsbSerialPort
|
||||
import com.hoho.android.usbserial.driver.UsbSerialProber
|
||||
import com.hoho.android.usbserial.util.SerialInputOutputManager
|
||||
import java.io.File
|
||||
import java.lang.Exception
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
class MainActivity : AppCompatActivity()
|
||||
// , SerialInputOutputManager.Listener
|
||||
{
|
||||
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var viewModel: MainViewModel
|
||||
|
||||
private val TAG = "MainActivity"
|
||||
// private lateinit var usbSerialPort: UsbSerialPort
|
||||
// private val WRITE_WAIT_MILLIS = 5000
|
||||
|
||||
// private val TAG = "Surya"
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
viewModel = ViewModelProvider(this)[MainViewModel::class.java]
|
||||
setDropDownMenu()
|
||||
}
|
||||
|
||||
private fun setDropDownMenu() {
|
||||
val adapter = ArrayAdapter.createFromResource(
|
||||
viewModel = ViewModelProvider(
|
||||
this,
|
||||
R.array.instrument, android.R.layout.simple_spinner_item
|
||||
)
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
binding.spinnerDevice.adapter = adapter
|
||||
binding.spinnerDevice.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(
|
||||
parent: AdapterView<*>,
|
||||
p1: View?,
|
||||
position: Int,
|
||||
p3: Long
|
||||
) {
|
||||
viewModel.device = parent.getItemAtPosition(position).toString()
|
||||
}
|
||||
MyViewModelFactory(applicationContext)
|
||||
)[MainViewModel::class.java]
|
||||
|
||||
override fun onNothingSelected(p0: AdapterView<*>?) {}
|
||||
}
|
||||
|
||||
// setupObservers()
|
||||
setupListeners()
|
||||
|
||||
// getUSBData()
|
||||
}
|
||||
|
||||
private fun setupListeners() {
|
||||
|
||||
binding.cvItem1.setOnClickListener {
|
||||
val i = Intent(applicationContext, TestRightActivity::class.java)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
binding.cvItem2.setOnClickListener {
|
||||
Toast.makeText(this, "To be Implemented", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
|
||||
// binding.confirmatory.setOnClickListener {
|
||||
// val usbIoManager = SerialInputOutputManager(usbSerialPort, this)
|
||||
// object : SerialInputOutputManager.Listener {
|
||||
//
|
||||
// override fun onNewData(data: ByteArray?) {
|
||||
// Log.d(TAG, "onNewData callback called")
|
||||
// data?.let {
|
||||
// val str: String = String(data, StandardCharsets.UTF_8)
|
||||
// Log.d(TAG, "DATA FROM DEVICE IS : $str")
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// override fun onRunError(e: Exception?) {
|
||||
// Log.d(TAG, "ERORRRRR -> $e")
|
||||
// }
|
||||
// })
|
||||
|
||||
// usbIoManager.start()
|
||||
// usbSerialPort.write("print\r".toByteArray(), WRITE_WAIT_MILLIS);
|
||||
// }
|
||||
}
|
||||
|
||||
// private fun getUSBData() {
|
||||
// val manager = getSystemService(Context.USB_SERVICE) as UsbManager
|
||||
// val availableDrivers: List<UsbSerialDriver> =
|
||||
// UsbSerialProber.getDefaultProber().findAllDrivers(manager)
|
||||
// if (availableDrivers.isEmpty()) {
|
||||
// Log.d(TAG, "No device Connected")
|
||||
// } else {
|
||||
// val driver: UsbSerialDriver = availableDrivers[0]
|
||||
// val connection = manager.openDevice(driver.device)
|
||||
// if (connection == null) {
|
||||
// requestUserPermission(manager, driver.device)
|
||||
// }
|
||||
//
|
||||
// usbSerialPort = driver.ports[0]
|
||||
// usbSerialPort.open(connection)
|
||||
// usbSerialPort.setParameters(115200, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE)
|
||||
// }
|
||||
// }
|
||||
|
||||
/*
|
||||
* Request user permission. The response will be received in the BroadcastReceiver
|
||||
*/
|
||||
// private fun requestUserPermission(manager: UsbManager, device: UsbDevice) {
|
||||
// Log.d(
|
||||
// TAG,
|
||||
// String.format("requestUserPermission(%X:%X)", device.vendorId, device.productId)
|
||||
// )
|
||||
// val mPendingIntent = PendingIntent.getBroadcast(
|
||||
// this,
|
||||
// 0,
|
||||
// Intent(Constants.ACTION_USB_PERMISSION),
|
||||
// 0
|
||||
// )
|
||||
// manager.requestPermission(device, mPendingIntent)
|
||||
// }
|
||||
|
||||
private fun setupObservers() {
|
||||
// viewModel.isStoragePermission.observe(this) {
|
||||
// if (it) {
|
||||
// createFolder()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
// override fun onNewData(data: ByteArray?) {
|
||||
//// Log.d(TAG, "onNewData callback called")
|
||||
// data?.let {
|
||||
// val str: String = String(data, StandardCharsets.UTF_8)
|
||||
// Log.d(TAG, "DATA FROM DEVICE IS : $str")
|
||||
// }
|
||||
// }
|
||||
|
||||
// override fun onRunError(e: Exception?) {
|
||||
// Log.d(TAG, "ERORRRRR -> $e")
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -1,8 +1,25 @@
|
||||
package com.example.refactoredapp.presentation
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.example.refactoredapp.data.model.DenovixData
|
||||
import com.example.refactoredapp.data.model.DeviceType
|
||||
import com.example.refactoredapp.domain.ParseCSV
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
|
||||
class MainViewModel : ViewModel() {
|
||||
class MainViewModel(private val parseDenovix: ParseCSV, private val parseTestRight: ParseCSV) : ViewModel() {
|
||||
|
||||
var device = ""
|
||||
var device = DeviceType.TestRight
|
||||
var isStoragePermission = MutableLiveData<Boolean>(false)
|
||||
|
||||
val resultsLiveData = MutableLiveData<ArrayList<DenovixData>>()
|
||||
|
||||
fun parseCSV(file: File){
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
parseDenovix.parseCSV(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.example.refactoredapp.presentation
|
||||
|
||||
import com.example.refactoredapp.data.model.DenovixData
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.example.refactoredapp.R
|
||||
|
||||
class RVAdapter : RecyclerView.Adapter<RVAdapter.ViewHolder>() {
|
||||
|
||||
private val dataset = ArrayList<DenovixData>()
|
||||
|
||||
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
return ViewHolder(
|
||||
LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.table_item, parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return dataset.size
|
||||
}
|
||||
|
||||
fun updateDataSet(newDataSet: ArrayList<DenovixData>) {
|
||||
dataset.clear()
|
||||
dataset.addAll(newDataSet)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.example.refactoredapp.presentation
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.provider.Settings
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.data.DataHolder
|
||||
import com.example.refactoredapp.databinding.ActivitySplashBinding
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* Splash Activity
|
||||
* Used for preprocessing of data, permissions
|
||||
*/
|
||||
class SplashActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivitySplashBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivitySplashBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
checkForPermissions()
|
||||
}
|
||||
|
||||
private fun checkForPermissions() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
getPermissionsAboveAndroidR()
|
||||
} else {
|
||||
getPermissionsBelowAndroidR()
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.R)
|
||||
private fun getPermissionsAboveAndroidR() {
|
||||
// Checking if permission is already granted or not.
|
||||
if (!Environment.isExternalStorageManager()) {
|
||||
val storagePermissionResultLauncher =
|
||||
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
||||
if (Environment.isExternalStorageManager()) {
|
||||
DataHolder.isStoragePermissionGranted = true
|
||||
moveToLandingPage()
|
||||
} else {
|
||||
DataHolder.isStoragePermissionGranted = false
|
||||
Toast.makeText(
|
||||
this,
|
||||
"You must grant permission to storage to use the app",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
val intent = Intent()
|
||||
intent.action = Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
|
||||
intent.data = Uri.fromParts("package", this.packageName, null)
|
||||
storagePermissionResultLauncher.launch(intent)
|
||||
} else {
|
||||
DataHolder.isStoragePermissionGranted = true
|
||||
moveToLandingPage()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getPermissionsBelowAndroidR() {
|
||||
val requestPermissionLauncher =
|
||||
registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted: Boolean ->
|
||||
if (isGranted) {
|
||||
DataHolder.isStoragePermissionGranted = true
|
||||
moveToLandingPage()
|
||||
} else {
|
||||
DataHolder.isStoragePermissionGranted = false
|
||||
Toast.makeText(
|
||||
this,
|
||||
"You must grant permission to storage to use the app",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
if (ContextCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
) != PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
requestPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
} else {
|
||||
DataHolder.isStoragePermissionGranted = true
|
||||
moveToLandingPage()
|
||||
}
|
||||
}
|
||||
|
||||
private fun moveToLandingPage() {
|
||||
createAppFolder()
|
||||
val i = Intent(applicationContext, MainActivity::class.java)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
private fun createAppFolder() {
|
||||
val file = File(
|
||||
Environment.getExternalStorageDirectory().absolutePath + "/" + resources.getString(R.string.app_name) + "/"
|
||||
)
|
||||
if (!file.exists()) {
|
||||
if (!file.mkdirs()) {
|
||||
Toast.makeText(this, "Problem creating folder", Toast.LENGTH_SHORT).show()
|
||||
DataHolder.isAppFolderCreated = false
|
||||
} else {
|
||||
DataHolder.isAppFolderCreated = true
|
||||
}
|
||||
} else {
|
||||
DataHolder.isAppFolderCreated = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.example.refactoredapp.presentation.TestRight
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.databinding.ActivityMainBinding
|
||||
import com.example.refactoredapp.databinding.ActivityTestRightBinding
|
||||
import com.example.refactoredapp.util.MyViewModelFactory
|
||||
|
||||
class TestRightActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivityTestRightBinding
|
||||
private lateinit var viewModel: TestRightViewModel
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityTestRightBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
viewModel = ViewModelProvider(this, MyViewModelFactory(this.applicationContext))[TestRightViewModel::class.java]
|
||||
|
||||
if (!viewModel.isReferenceDone)
|
||||
supportFragmentManager.beginTransaction().replace(binding.flMain.id, TestRightExpReference()).commit()
|
||||
else
|
||||
supportFragmentManager.beginTransaction().replace(binding.flMain.id, TestRightExpSample()).commit()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.example.refactoredapp.presentation.TestRight
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.databinding.FragmentTestRightExpReferenceBinding
|
||||
import com.example.refactoredapp.databinding.FragmentTestRightResultsBinding
|
||||
|
||||
class TestRightExpReference : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentTestRightExpReferenceBinding
|
||||
private val viewModel: TestRightViewModel by activityViewModels()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
// Inflate the layout for this fragment
|
||||
binding = FragmentTestRightExpReferenceBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setupListeners()
|
||||
}
|
||||
|
||||
private fun setupListeners() {
|
||||
binding.btnSetReference.setOnClickListener {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.example.refactoredapp.presentation.TestRight
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.databinding.FragmentTestRightExpReferenceBinding
|
||||
|
||||
class TestRightExpSample : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentTestRightExpReferenceBinding
|
||||
private val viewModel: TestRightViewModel by activityViewModels()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
// Inflate the layout for this fragment
|
||||
binding = FragmentTestRightExpReferenceBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.example.refactoredapp.presentation.TestRight
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.databinding.FragmentTestRightResultsBinding
|
||||
import com.example.refactoredapp.util.MyUtils
|
||||
|
||||
class TestRightResults : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentTestRightResultsBinding
|
||||
private val viewModel: TestRightViewModel by activityViewModels()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_test_right_results, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setDropDownMenu()
|
||||
}
|
||||
|
||||
// TODO: Incomplete
|
||||
fun setDropDownMenu() {
|
||||
val adapter = ArrayAdapter.createFromResource(
|
||||
requireContext(),
|
||||
R.array.instrument, android.R.layout.simple_spinner_item
|
||||
)
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
// binding.spinnerDevice.adapter = adapter
|
||||
// binding.spinnerDevice.onItemSelectedListener =
|
||||
// object : AdapterView.OnItemSelectedListener {
|
||||
// override fun onItemSelected(
|
||||
// parent: AdapterView<*>,
|
||||
// p1: View?,
|
||||
// position: Int,
|
||||
// p3: Long
|
||||
// ) {
|
||||
// viewModel.device = MyUtils().getDeviceTypeFromString(
|
||||
// parent.getItemAtPosition(position).toString()
|
||||
// )
|
||||
// }
|
||||
//
|
||||
// override fun onNothingSelected(p0: AdapterView<*>?) {}
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.example.refactoredapp.presentation.TestRight
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
class TestRightViewModel : ViewModel() {
|
||||
|
||||
var isReferenceDone = false
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.example.refactoredapp.presentation.TestRight
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
class UsbService : Service() {
|
||||
|
||||
override fun onBind(intent: Intent): IBinder {
|
||||
TODO("Return the communication channel to the service.")
|
||||
}
|
||||
}
|
||||
16
app/src/main/java/com/example/refactoredapp/util/MyUtils.kt
Normal file
16
app/src/main/java/com/example/refactoredapp/util/MyUtils.kt
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.example.refactoredapp.util
|
||||
|
||||
import com.example.refactoredapp.R
|
||||
import com.example.refactoredapp.data.model.DeviceType
|
||||
|
||||
class MyUtils {
|
||||
|
||||
fun getDeviceTypeFromString(deviceName: String) : DeviceType {
|
||||
return if (deviceName == "TestRight"){
|
||||
DeviceType.TestRight
|
||||
} else {
|
||||
DeviceType.Denovix
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.example.refactoredapp.util
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.example.refactoredapp.data.RepositoryImpl
|
||||
import com.example.refactoredapp.domain.ParseDenovixUseCase
|
||||
import com.example.refactoredapp.domain.ParseTestRightCSVUseCase
|
||||
import com.example.refactoredapp.presentation.MainActivity
|
||||
import com.example.refactoredapp.presentation.MainViewModel
|
||||
import com.example.refactoredapp.presentation.TestRight.TestRightActivity
|
||||
import com.example.refactoredapp.presentation.TestRight.TestRightViewModel
|
||||
|
||||
class MyViewModelFactory(private val context: Context) : ViewModelProvider.Factory {
|
||||
|
||||
override fun <T : ViewModel> create(modelClass: Class<T>): T {
|
||||
if (modelClass.isAssignableFrom(MainViewModel::class.java))
|
||||
return MainViewModel(ParseDenovixUseCase(), ParseTestRightCSVUseCase()) as T
|
||||
else if (modelClass.isAssignableFrom(TestRightViewModel::class.java))
|
||||
return TestRightViewModel() as T
|
||||
else
|
||||
throw IllegalArgumentException("Unknown ViewModel class");
|
||||
}
|
||||
}
|
||||
5
app/src/main/res/drawable/ic_baseline_blur_on_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_blur_on_24.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="48dp" android:tint="#000000"
|
||||
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="M6,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM6,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM6,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM3,9.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM6,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM21,10.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM14,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zM14,3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM3,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM10,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zM10,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM18,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM21,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM14,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM14,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM10,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM14,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM14,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5z"/>
|
||||
</vector>
|
||||
7
app/src/main/res/font/inter_bold.xml
Normal file
7
app/src/main/res/font/inter_bold.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="name=Inter&weight=700"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
|
||||
</font-family>
|
||||
7
app/src/main/res/font/inter_medium.xml
Normal file
7
app/src/main/res/font/inter_medium.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="name=Inter&weight=500"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
|
||||
</font-family>
|
||||
7
app/src/main/res/font/inter_regular.xml
Normal file
7
app/src/main/res/font/inter_regular.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="name=Inter&weight=600"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
|
||||
</font-family>
|
||||
7
app/src/main/res/font/poppins400.xml
Normal file
7
app/src/main/res/font/poppins400.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="Poppins">
|
||||
</font-family>
|
||||
7
app/src/main/res/font/poppins500.xml
Normal file
7
app/src/main/res/font/poppins500.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="name=Poppins&weight=500"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
|
||||
</font-family>
|
||||
7
app/src/main/res/font/poppins600.xml
Normal file
7
app/src/main/res/font/poppins600.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:fontProviderAuthority="com.google.android.gms.fonts"
|
||||
app:fontProviderPackage="com.google.android.gms"
|
||||
app:fontProviderQuery="name=Poppins&weight=600"
|
||||
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
|
||||
</font-family>
|
||||
@@ -4,184 +4,76 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true">
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
style="@style/title1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/select_the_test"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cv_item1"
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="112dp"
|
||||
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="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="80dp"
|
||||
android:src="@drawable/shanmukha_logo_small"
|
||||
android:textColor="#131313"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold">
|
||||
|
||||
</ImageView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/shanmukha_logo_small"
|
||||
android:text="Sickle Cell App 0.0.3"
|
||||
android:textColor="#000"
|
||||
android:textSize="18sp"
|
||||
|
||||
android:textStyle="bold">
|
||||
|
||||
</TextView>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/table45"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/instrument_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_column="1"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
|
||||
android:text="Select the instrument*"
|
||||
android:textColor="#000"
|
||||
|
||||
android:textSize="17sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_device"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/iv_image_item1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
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" />
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="5dp"
|
||||
android:text="Select Test Type *"
|
||||
android:textColor="#000"
|
||||
|
||||
android:textSize="17sp"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/screening"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:text="Screening"
|
||||
|
||||
android:textColor="#000"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/confirmatory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
android:layout_marginRight="23dp"
|
||||
android:text="confirmatory"
|
||||
|
||||
android:textColor="#000"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/RelativeLayout1"
|
||||
android:layout_width="fill_parent"
|
||||
<TextView
|
||||
android:id="@+id/tv_title_item1"
|
||||
style="@style/title2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="0dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="0dp">
|
||||
android:text="Test Right"
|
||||
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="112dp"
|
||||
android:layout_height="112dp"
|
||||
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" />
|
||||
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/table_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingBottom="23dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#000"
|
||||
android:textSize="23dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result_confirmatory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#000"
|
||||
android:textSize="23dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</layout>
|
||||
56
app/src/main/res/layout/activity_splash.xml
Normal file
56
app/src/main/res/layout/activity_splash.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?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.SplashActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_app_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/shanmukha_logo_small"
|
||||
android:textColor="#131313"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_app_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/shanmukha_logo_small"
|
||||
android:text="Sickle Cell App 0.0.3"
|
||||
android:textColor="#000"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_app_icon"
|
||||
app:layout_constraintHorizontal_bias="0.497"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_app_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_app_icon" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
16
app/src/main/res/layout/activity_test_right.xml
Normal file
16
app/src/main/res/layout/activity_test_right.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".presentation.TestRight.TestRightActivity">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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"
|
||||
tools:context=".presentation.TestRight.TestRightExpReference">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hello_blank_fragment"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_set_reference"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_reference"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
14
app/src/main/res/layout/fragment_test_right_exp_sample.xml
Normal file
14
app/src/main/res/layout/fragment_test_right_exp_sample.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".presentation.TestRight.TestRightExpSample">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
|
||||
</layout>
|
||||
187
app/src/main/res/layout/fragment_test_right_results.xml
Normal file
187
app/src/main/res/layout/fragment_test_right_results.xml
Normal file
@@ -0,0 +1,187 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".presentation.TestRight.TestRightResults">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="80dp"
|
||||
android:src="@drawable/shanmukha_logo_small"
|
||||
android:textColor="#131313"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold">
|
||||
|
||||
</ImageView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/shanmukha_logo_small"
|
||||
android:text="Sickle Cell App 0.0.3"
|
||||
android:textColor="#000"
|
||||
android:textSize="18sp"
|
||||
|
||||
android:textStyle="bold">
|
||||
|
||||
</TextView>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/table45"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/instrument_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_column="1"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
|
||||
android:text="Select the instrument*"
|
||||
android:textColor="#000"
|
||||
|
||||
android:textSize="17sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_device"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="5dp"
|
||||
android:text="Select Test Type *"
|
||||
android:textColor="#000"
|
||||
|
||||
android:textSize="17sp"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/screening"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:text="Screening"
|
||||
|
||||
android:textColor="#000"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/confirmatory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="5dp"
|
||||
|
||||
android:layout_marginRight="23dp"
|
||||
android:text="confirmatory"
|
||||
|
||||
android:textColor="#000"
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#EEE" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/RelativeLayout1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="0dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="0dp">
|
||||
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/table_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingBottom="23dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#000"
|
||||
android:textSize="23dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result_confirmatory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#000"
|
||||
android:textSize="23dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
6
app/src/main/res/layout/table_item.xml
Normal file
6
app/src/main/res/layout/table_item.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
||||
17
app/src/main/res/values/font_certs.xml
Normal file
17
app/src/main/res/values/font_certs.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<array name="com_google_android_gms_fonts_certs">
|
||||
<item>@array/com_google_android_gms_fonts_certs_dev</item>
|
||||
<item>@array/com_google_android_gms_fonts_certs_prod</item>
|
||||
</array>
|
||||
<string-array name="com_google_android_gms_fonts_certs_dev">
|
||||
<item>
|
||||
MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
|
||||
</item>
|
||||
</string-array>
|
||||
<string-array name="com_google_android_gms_fonts_certs_prod">
|
||||
<item>
|
||||
MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
|
||||
</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -5,4 +5,8 @@
|
||||
<item>TestRight</item>
|
||||
<item>Denovix</item>
|
||||
</string-array>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="select_the_test">Select the Test</string>
|
||||
<string name="set_reference">Set Reference</string>
|
||||
</resources>
|
||||
21
app/src/main/res/values/styles.xml
Normal file
21
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<resources>
|
||||
|
||||
<style name="title1">
|
||||
<item name="android:textSize">20.5sp</item>
|
||||
<item name="android:letterSpacing">-0.01</item>
|
||||
<item name="android:textColor">#000000</item>
|
||||
<item name="fontFamily">@font/poppins600</item>
|
||||
<item name="android:translationY">-0.62sp</item>
|
||||
</style>
|
||||
|
||||
<style name="title2">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:letterSpacing">-0.01</item>
|
||||
<item name="android:textColor">#000000</item>
|
||||
<item name="fontFamily">@font/poppins400</item>
|
||||
<item name="android:translationY">-0.62sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
38
app/src/main/res/xml/device_filter.xml
Normal file
38
app/src/main/res/xml/device_filter.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 0x0403 / 0x60??: FTDI -->
|
||||
<usb-device vendor-id="1027" product-id="24577" /> <!-- 0x6001: FT232R -->
|
||||
<usb-device vendor-id="1027" product-id="24592" /> <!-- 0x6010: FT2232H -->
|
||||
<usb-device vendor-id="1027" product-id="24593" /> <!-- 0x6011: FT4232H -->
|
||||
<usb-device vendor-id="1027" product-id="24596" /> <!-- 0x6014: FT232H -->
|
||||
<usb-device vendor-id="1027" product-id="24597" /> <!-- 0x6015: FT230X, FT231X, FT234XD -->
|
||||
|
||||
<!-- 0x10C4 / 0xEA??: Silabs CP210x -->
|
||||
<usb-device vendor-id="4292" product-id="60000" /> <!-- 0xea60: CP2102 and other CP210x single port devices -->
|
||||
<usb-device vendor-id="4292" product-id="60016" /> <!-- 0xea70: CP2105 -->
|
||||
<usb-device vendor-id="4292" product-id="60017" /> <!-- 0xea71: CP2108 -->
|
||||
|
||||
<!-- 0x067B / 0x23?3: Prolific PL2303x -->
|
||||
<usb-device vendor-id="1659" product-id="8963" /> <!-- 0x2303: PL2303HX, HXD, TA, ... -->
|
||||
<usb-device vendor-id="1659" product-id="9123" /> <!-- 0x23a3: PL2303GC -->
|
||||
<usb-device vendor-id="1659" product-id="9139" /> <!-- 0x23b3: PL2303GB -->
|
||||
<usb-device vendor-id="1659" product-id="9155" /> <!-- 0x23c3: PL2303GT -->
|
||||
<usb-device vendor-id="1659" product-id="9171" /> <!-- 0x23d3: PL2303GL -->
|
||||
<usb-device vendor-id="1659" product-id="9187" /> <!-- 0x23e3: PL2303GE -->
|
||||
<usb-device vendor-id="1659" product-id="9203" /> <!-- 0x23f3: PL2303GS -->
|
||||
|
||||
<!-- 0x1a86 / 0x?523: Qinheng CH34x -->
|
||||
<usb-device vendor-id="6790" product-id="21795" /> <!-- 0x5523: CH341A -->
|
||||
<usb-device vendor-id="6790" product-id="29987" /> <!-- 0x7523: CH340 -->
|
||||
|
||||
<!-- CDC driver -->
|
||||
<usb-device vendor-id="9025" /> <!-- 0x2341 / ......: Arduino -->
|
||||
<usb-device vendor-id="5824" product-id="1155" /> <!-- 0x16C0 / 0x0483: Teensyduino -->
|
||||
<usb-device vendor-id="1003" product-id="8260" /> <!-- 0x03EB / 0x2044: Atmel Lufa -->
|
||||
<usb-device vendor-id="7855" product-id="4" /> <!-- 0x1eaf / 0x0004: Leaflabs Maple -->
|
||||
<usb-device vendor-id="3368" product-id="516" /> <!-- 0x0d28 / 0x0204: ARM mbed -->
|
||||
<usb-device vendor-id="1155" product-id="22336" /><!-- 0x0483 / 0x5740: ST CDC -->
|
||||
<usb-device vendor-id="11914" product-id="5" /> <!-- 0x2E8A / 0x0005: Raspberry Pi Pico Micropython -->
|
||||
<usb-device vendor-id="11914" product-id="10" /> <!-- 0x2E8A / 0x000A: Raspberry Pi Pico SDK -->
|
||||
<usb-device vendor-id="6790" product-id="21972" /><!-- 0x1A86 / 0x55D4: Qinheng CH9102F -->
|
||||
</resources>
|
||||
11
build.gradle
11
build.gradle
@@ -1,4 +1,12 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
//buildscript {
|
||||
// repositories {
|
||||
// google()
|
||||
// maven { url 'https://jitpack.io' }
|
||||
// }
|
||||
//}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '7.2.0' apply false
|
||||
id 'com.android.library' version '7.2.0' apply false
|
||||
@@ -7,4 +15,5 @@ plugins {
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
rootProject.name = "Refactored App"
|
||||
|
||||
Reference in New Issue
Block a user