Функционал механика ч.2

This commit is contained in:
Azat Sagutdinov 2024-04-27 09:05:48 +03:00
parent 9b567ff5f8
commit cac9026c88
27 changed files with 648 additions and 921 deletions

View File

@ -64,6 +64,7 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"> tools:ignore="GoogleAppIndexingWarning">
@ -78,6 +79,8 @@
<activity <activity
android:name="ru.tele2med.mobile.presentation.ui.splash.SplashActivity" android:name="ru.tele2med.mobile.presentation.ui.splash.SplashActivity"
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
@ -100,6 +103,7 @@
<activity <activity
android:name="ru.tele2med.mobile.presentation.ui.auth0.SplashAuth0Activity" android:name="ru.tele2med.mobile.presentation.ui.auth0.SplashAuth0Activity"
android:usesCleartextTraffic="true"
android:exported="true"> android:exported="true">
<intent-filter <intent-filter

View File

@ -304,6 +304,32 @@ interface ApiService {
): Single<TechResponse> ): Single<TechResponse>
@Multipart
@POST("${API_BASE_URL}waybills/tech_control/update/{uniq_id}")
fun updateTech(
@Path("uniq_id") uuid: String,
@Part("uniq_id") uuidPart: RequestBody,
@Part("vehicle_id") vehicleId: RequestBody?,
@Part("date_") date: RequestBody?,
@Part("time_") time: RequestBody?,
@Part("result_id") resultId: RequestBody?,
@Header("token") token: String? = "iddqd",
@Header("Authorization") tokenUser: String?
): Single<TechUpdateListResponse>
@Multipart
@POST("${API_BASE_URL}waybills/checklist/show/{uniq_id}")
fun show(
@Path("uniq_id") uuid: String,
@Part("uniq_id") uuidPart: RequestBody,
@Header("token") token: String? = "iddqd",
@Header("Authorization") tokenUser: String?
): Single<TechShowListResponse>
} }
/*-- Дальше OLD --*/ /*-- Дальше OLD --*/

View File

@ -0,0 +1 @@
package ru.tele2med.mobile.data.api.entity.response import ru.tele2med.mobile.domain.entity.DataCheckup import ru.tele2med.mobile.domain.entity.DataTechCheckup import ru.tele2med.mobile.domain.entity.DataTechShow import ru.tele2med.mobile.domain.entity.DataTechUpdate data class TechShowListResponse( val af: String, val status: String, val message: String, val data: DataTechShow )

View File

@ -0,0 +1 @@
package ru.tele2med.mobile.data.api.entity.response import ru.tele2med.mobile.domain.entity.DataCheckup import ru.tele2med.mobile.domain.entity.DataTechCheckup import ru.tele2med.mobile.domain.entity.DataTechUpdate data class TechUpdateListResponse( val af: String, val status: String, val message: String, val data: DataTechUpdate )

View File

@ -79,6 +79,23 @@ class DataConverter {
) )
fun toTechUpdate(list: TechUpdateListResponse): TechUpdateList =
TechUpdateList(
af = list.af,
status = list.status,
data = list.data,
message = list.message
)
fun toTechShow(list: TechShowListResponse): TechShowList =
TechShowList(
af = list.af,
status = list.status,
data = list.data,
message = list.message
)
fun toTech(tech: TechResponse): Tech = fun toTech(tech: TechResponse): Tech =
Tech( Tech(
af = tech.af, af = tech.af,

View File

@ -1,15 +1,12 @@
package ru.tele2med.mobile.data.repository package ru.tele2med.mobile.data.repository
import ru.tele2med.mobile.domain.entity.MedicalCheckupList
import ru.tele2med.mobile.domain.entity.QR
import ru.tele2med.mobile.domain.repository.QRRepository import ru.tele2med.mobile.domain.repository.QRRepository
import ru.tele2med.mobile.presentation.util.Prefs import ru.tele2med.mobile.presentation.util.Prefs
import io.reactivex.Single import io.reactivex.Single
import okhttp3.MediaType import okhttp3.MediaType
import okhttp3.RequestBody import okhttp3.RequestBody
import ru.tele2med.mobile.data.api.ApiService import ru.tele2med.mobile.data.api.ApiService
import ru.tele2med.mobile.domain.entity.Tech import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.domain.entity.TechCheckupList
import ru.tele2med.mobile.domain.repository.TechRepository import ru.tele2med.mobile.domain.repository.TechRepository
@ -69,4 +66,47 @@ class TechRepositoryImpl(
.map(dataConverter::toTechCheckupListAll) .map(dataConverter::toTechCheckupListAll)
override fun updateTech(
id: String,
vehicleId: String,
date: String,
time: String,
resultId: String
): Single<TechUpdateList> =
apiService
.updateTech(
uuid = id,
uuidPart = RequestBody.create(
MediaType.parse("text/plain"), id
),
vehicleId = RequestBody.create(
MediaType.parse("text/plain"), vehicleId
),
date = RequestBody.create(
MediaType.parse("text/plain"), date
),
time = RequestBody.create(
MediaType.parse("text/plain"), time
),
resultId = RequestBody.create(
MediaType.parse("text/plain"), resultId
),
tokenUser = "Bearer ${prefs.getTokenUser().toString()}"
)
.map(dataConverter::toTechUpdate)
override fun showTech(
id: String
): Single<TechShowList> =
apiService
.show(
uuid = id,
uuidPart = RequestBody.create(
MediaType.parse("text/plain"), id
),
tokenUser = "Bearer ${prefs.getTokenUser().toString()}"
)
.map(dataConverter::toTechShow)
} }

View File

@ -14,9 +14,13 @@ import org.kodein.di.generic.singleton
import retrofit2.Retrofit import retrofit2.Retrofit
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
import retrofit2.converter.gson.GsonConverterFactory import retrofit2.converter.gson.GsonConverterFactory
import java.security.KeyStore
import java.security.SecureRandom
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
import java.util.* import java.util.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.net.ssl.SSLSession import javax.net.ssl.*
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
@ -55,7 +59,6 @@ fun verify(hostname: String?, session: SSLSession?): Boolean {
} }
private fun provideOkHttpClient(network: Interceptor, query: Interceptor): OkHttpClient = private fun provideOkHttpClient(network: Interceptor, query: Interceptor): OkHttpClient =
OkHttpClient.Builder() OkHttpClient.Builder()
.connectTimeout(TIMEOUT, TimeUnit.SECONDS) .connectTimeout(TIMEOUT, TimeUnit.SECONDS)
@ -68,17 +71,68 @@ private fun provideOkHttpClient(network: Interceptor, query: Interceptor): OkHtt
.build() .build()
private fun getUnsafeOkHttpClient(): OkHttpClient? {
return try {
// Create a trust manager that does not validate certificate chains
val trustAllCerts = arrayOf<TrustManager>(
object : X509TrustManager {
@Throws(CertificateException::class)
override fun checkClientTrusted(
chain: Array<X509Certificate?>?,
authType: String?
) {
}
@Throws(CertificateException::class)
override fun checkServerTrusted(
chain: Array<X509Certificate?>?,
authType: String?
) {
}
override fun getAcceptedIssuers(): Array<X509Certificate?>? {
return arrayOf()
}
}
)
// Install the all-trusting trust manager
val sslContext = SSLContext.getInstance("SSL")
sslContext.init(null, trustAllCerts, SecureRandom())
// Create an ssl socket factory with our all-trusting manager
val sslSocketFactory = sslContext.socketFactory
val trustManagerFactory: TrustManagerFactory =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())
trustManagerFactory.init(null as KeyStore?)
val trustManagers: Array<TrustManager> =
trustManagerFactory.trustManagers
check(!(trustManagers.size != 1 || trustManagers[0] !is X509TrustManager)) {
"Unexpected default trust managers:" + trustManagers.contentToString()
}
val trustManager =
trustManagers[0] as X509TrustManager
val builder = OkHttpClient.Builder()
builder.sslSocketFactory(sslSocketFactory, trustManager)
builder.hostnameVerifier(HostnameVerifier { _, _ -> true })
builder.build()
} catch (e: Exception) {
throw RuntimeException(e)
}
}
private fun provideRetrofit(client: OkHttpClient, gson: Gson): Retrofit = private fun provideRetrofit(client: OkHttpClient, gson: Gson): Retrofit =
Retrofit.Builder() Retrofit.Builder()
.addConverterFactory(GsonConverterFactory.create(gson)) .addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.client(client) .client(getUnsafeOkHttpClient())
//.client(client)
.baseUrl(serverUrl) .baseUrl(serverUrl)
.build() .build()
private class SessionCookieJar : CookieJar { private class SessionCookieJar : CookieJar {
private var cookies: List<Cookie>? = null private var cookies: List<Cookie>? = null
override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) { override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) {

View File

@ -0,0 +1,23 @@
package ru.tele2med.mobile.domain.entity
data class DataShow(
val id: String,
val uniq_id: String,
val template_checklist_uniq_id: String,
val name: String?,
val type_id: String?,
val type_name: String?,
val required_field: String?,
val need_photo_if_no: String?,
val order: String,
val comment: String,
val date_create: String,
val date_update: String,
val date_delete: String,
val enabled: String,
val tree: String?,
val clf_uniq_id: String,
val has_data: String,
val value: String
)

View File

@ -0,0 +1,19 @@
package ru.tele2med.mobile.domain.entity
data class DataTechShow(
val id: String,
val uniq_id: String,
val template_checklist_uniq_id: String,
val waybill_uniq_id: String?,
val techcontrol_uuid: String?,
val organization_id: String?,
val name: String?,
val comment: String?,
val date_create: String,
val date_update: String,
val date_delete: String,
val enabled: String,
val data: List<DataShow>
)

View File

@ -0,0 +1,16 @@
package ru.tele2med.mobile.domain.entity
data class DataTechUpdate(
val id: String,
val uniq_id: String,
val user_uniq_id: String,
val tech_control_uniq_id: String,
val solution: String?,
val description: String?,
val tech: String,
val date_create: String,
val date_update: String,
val date_delete: String,
val enabled: String
)

View File

@ -0,0 +1,8 @@
package ru.tele2med.mobile.domain.entity
data class TechShowList(
val af: String,
val status: String,
val message: String,
val data: DataTechShow
)

View File

@ -0,0 +1,8 @@
package ru.tele2med.mobile.domain.entity
data class TechUpdateList(
val af: String,
val status: String,
val message: String,
val data: DataTechUpdate
)

View File

@ -1,11 +1,8 @@
package ru.tele2med.mobile.domain.interactor package ru.tele2med.mobile.domain.interactor
import ru.tele2med.mobile.domain.entity.MedicalCheckupList
import ru.tele2med.mobile.domain.entity.QR
import ru.tele2med.mobile.domain.repository.QRRepository import ru.tele2med.mobile.domain.repository.QRRepository
import io.reactivex.Single import io.reactivex.Single
import ru.tele2med.mobile.domain.entity.Tech import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.domain.entity.TechCheckupList
import ru.tele2med.mobile.domain.repository.TechRepository import ru.tele2med.mobile.domain.repository.TechRepository
class TechInteractor( class TechInteractor(
@ -17,5 +14,18 @@ class TechInteractor(
fun getTechCheckupList(offset: Int, limit: Int): Single<TechCheckupList> = fun getTechCheckupList(offset: Int, limit: Int): Single<TechCheckupList> =
techRepository.getTechCheckupAll(offset, limit) techRepository.getTechCheckupAll(offset, limit)
fun updateTech(
id: String,
vehicleId: String,
date: String,
time: String,
resultId: String
): Single<TechUpdateList> =
techRepository.updateTech(id, vehicleId, date, time, resultId)
fun showTech(
id: String,
): Single<TechShowList> =
techRepository.showTech(id)
} }

View File

@ -1,13 +1,21 @@
package ru.tele2med.mobile.domain.repository package ru.tele2med.mobile.domain.repository
import ru.tele2med.mobile.domain.entity.MedicalCheckupList
import ru.tele2med.mobile.domain.entity.QR
import io.reactivex.Single import io.reactivex.Single
import ru.tele2med.mobile.domain.entity.Tech import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.domain.entity.TechCheckupList
interface TechRepository { interface TechRepository {
fun getTech(id: String): Single<Tech> fun getTech(id: String): Single<Tech>
fun getTechCheckupAll(offset: Int, limit: Int): Single<TechCheckupList> fun getTechCheckupAll(offset: Int, limit: Int): Single<TechCheckupList>
fun updateTech(
id: String,
vehicleId: String,
date: String,
time: String,
resultId: String
): Single<TechUpdateList>
fun showTech(
id: String,
): Single<TechShowList>
} }

View File

@ -93,6 +93,11 @@ object NavScreens {
fun getTechCheckup(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech) fun getTechCheckup(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech)
fun getTechCheckupInfo(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech)
fun getTechCheckupTests(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech)
fun getMedicalCheckups(): CheckupsScreen = CheckupsScreen() fun getMedicalCheckups(): CheckupsScreen = CheckupsScreen()
fun getAlkoScreen(): AlkoScreen = AlkoScreen() fun getAlkoScreen(): AlkoScreen = AlkoScreen()

View File

@ -38,7 +38,6 @@ class TechListPresenter(
viewState.hideLoading() viewState.hideLoading()
} }
.subscribe({ .subscribe({
navRouter.openTechCheckupScreen(it.data) navRouter.openTechCheckupScreen(it.data)
}, { }, {
if (it is ApiException) { if (it is ApiException) {

View File

@ -5,7 +5,9 @@ import android.os.Bundle
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter import androidx.fragment.app.FragmentStatePagerAdapter
import com.google.gson.Gson
import ru.tele2med.mobile.R import ru.tele2med.mobile.R
import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoFragment import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoFragment
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsFragment import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsFragment
@ -14,9 +16,11 @@ class TechCheckupAdapter(val context: Context, fm: FragmentManager, private var
private var fragments: MutableList<Fragment> = mutableListOf() private var fragments: MutableList<Fragment> = mutableListOf()
override fun getItem(position: Int): Fragment { override fun getItem(position: Int): Fragment {
val gson = Gson()
val data = gson.fromJson(dataTech, DataTech::class.java)
return when (position) { return when (position) {
0 -> { 0 -> {
val fragment = TechCheckupInfoFragment.getInstance(dataTech) val fragment = TechCheckupInfoFragment.getInstance(data)
val arguments = Bundle() val arguments = Bundle()
fragment.arguments = arguments fragment.arguments = arguments
@ -24,7 +28,7 @@ class TechCheckupAdapter(val context: Context, fm: FragmentManager, private var
fragment fragment
} }
1 -> { 1 -> {
val fragment = TechCheckupTestsFragment.getInstance(dataTech) val fragment = TechCheckupTestsFragment.getInstance(data)
val arguments = Bundle() val arguments = Bundle()
fragment.arguments = arguments fragment.arguments = arguments
fragments.add(fragment) fragments.add(fragment)

View File

@ -2,12 +2,15 @@ package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoFragment
import ru.terrakok.cicerone.android.support.SupportAppScreen import ru.terrakok.cicerone.android.support.SupportAppScreen
class TechCheckupScreen(val dataTech: DataTech) : SupportAppScreen() { class TechCheckupScreen(val dataTech: DataTech) : SupportAppScreen() {
override fun getFragment(): Fragment { override fun getFragment(): Fragment {
// return TechCheckupInfoFragment.getInstance(dataTech)
return TechCheckupFragment.getInstance(dataTech) return TechCheckupFragment.getInstance(dataTech)
} }
override fun getScreenKey(): String { override fun getScreenKey(): String {

View File

@ -22,13 +22,10 @@ import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
import ru.tele2med.mobile.presentation.util.providePresenter import ru.tele2med.mobile.presentation.util.providePresenter
import kotlinx.android.synthetic.main.fragment_medical_checkup.* import kotlinx.android.synthetic.main.fragment_tech_checkup.*
import kotlinx.android.synthetic.main.toolbar_with_help.* import kotlinx.android.synthetic.main.toolbar_with_help.*
import ru.tele2med.mobile.BuildConfig
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.auth.number_enter.NumberEnterFragment import ru.tele2med.mobile.presentation.ui.menu.items.medicalCheckup.MedicalCheckupFragment
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsFragment
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsPresenter
class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView { class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
@ -72,8 +69,16 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
} }
} }
tvDriverTitle.focusable var dataString = this.requireArguments().getString(DATA_QR)
tvDriverTitle.requestFocus()
Log.v("DATA", "data 32 = $DATA_QR")
val gson = Gson()
val data = gson.fromJson(dataString, DataTech::class.java)
// tvDriverTitle.focusable
// tvDriverTitle.requestFocus()
presenter.showCheckUp() presenter.showCheckUp()
initRecycler() initRecycler()
@ -88,6 +93,16 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
private fun initRecycler() { private fun initRecycler() {
println("initRecycler") println("initRecycler")
val args = arguments
val index = args?.toString() // getString("data", "")
Log.v(
"TechCheckupInfoFragment", "data = $index ${args?.getString("data")}"
)
Log.v("TechCheckupInfoFragment", "args = ${arguments?.getString("data")}")
val gson = Gson()
val data = gson.fromJson(DATA_QR, DataTech::class.java)
fillData(data)
refresh.setOnRefreshListener { refresh.setOnRefreshListener {
println("setOnRefreshListener") println("setOnRefreshListener")
@ -95,6 +110,16 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
} }
startTest.setOnClickListener {
presenter.updateTech(
data.uniq_id,
data.vehicle_id,
data.date_,
data.time_,
data.result_id
)
}
} }
@SuppressLint("StringFormatInvalid") @SuppressLint("StringFormatInvalid")
@ -108,122 +133,14 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
var checkupVideoString: String var checkupVideoString: String
var checkupVideoUrl: Uri var checkupVideoUrl: Uri
tvDriverNumber.text = dataTech.vehicle_name
tvDrivers.text = dataTech.mechanic_name
tvOrgName.text = dataTech.organization_id
tvNumberPL.text = dataTech.waybill_name
tvDatePL.text = dataTech.datetime
tvStatusName.text = dataTech.exam_state_name
/* profilePhoto = "${BuildConfig.API_BASE_URL}${dataQR.profilePhoto}" tvStatusTest.text = dataTech.exam_state_description
profilePhotoUrl = profilePhoto.toUri()
checkupPhoto =
"${BuildConfig.API_BASE_URL}${dataQR.checkupPhoto?.replace("/media", "media")}"
checkupPhotoUrl = checkupPhoto.toUri()
checkupVideoString =
"${BuildConfig.API_BASE_URL}${dataQR.checkupVideo?.replace("/media", "media")}"
checkupVideoUrl = checkupVideoString.toUri()
tvMainInfoTitle.requestFocus()
tvMainInfoTitle.text = resources.getString(R.string.block_title_main_info, dataQR.idcheckup)
tvDriverNumber.text = dataQR.login
tvSex.text = dataQR.sex_name
tvSurname.text = dataQR.lastname
tvName.text = dataQR.name
tvPatronymic.text = dataQR.oldlastname
tvBirthday.text = dataQR.birthday
tvOrgName.text = dataQR.organization
tvCheckupDate.text = dataQR.exam_date
tvCheckupBeginTime.text = dataQR.exam_timestart
tvCheckupEndTime.text = dataQR.exam_timeend
tvCheckupType.text = dataQR.inspectiontype
tvCheckupTerminal.text = dataQR.terminal_name
tvCheckupStatus.text = dataQR.exam_state_name
tvCheckupMedic.text = dataQR.medic_fio
tvResultAuto.text = dataQR.exam_result_auto_txt
tvResultMedic.text = dataQR.exam_result_med_txt
tvMedicComment.text = dataQR.medic_comment
tvCheckupResultTime.text = dataQR.exam_result_datetime
// ivCheckupPhoto.setImageURI(checkupPhotoUrl)
val mediaController = MediaController(requireContext())
checkupVideo.setMediaController(mediaController)
mediaController.setMediaPlayer(checkupVideo)
println("гружу видео $checkupVideoUrl")
println("гружу фото $checkupPhotoUrl")
checkupVideo.setVideoURI(checkupVideoUrl)
checkupVideo.start()
// checkupVideo.background = null
println("гружу видео start")
// checkupVideo.background = resources.getDrawable(R.drawable.arrow)
/*() checkupVideo.setOnClickListener {
checkupVideo.background = null
checkupVideo.start()
}
checkupVideo.resume()
checkupVideo.pause() */
Glide.with(this).load(checkupPhoto).into(ivCheckupPhoto);
// Picasso.get().load(checkupPhotoUrl).rotate(0f).into(ivCheckupPhoto)
Picasso.get().load(profilePhotoUrl).into(ivDriverPhoto)
if (dataQR.exam_result_auto == 1) {
tvResultAuto.setBackgroundColor(resources.getColor(R.color.real_green))
tvResultAuto.setTextColor(resources.getColor(R.color.white))
} else {
tvResultAuto.setBackgroundColor(resources.getColor(R.color.dark_red))
tvResultAuto.setTextColor(resources.getColor(R.color.white))
}
if (dataQR.exam_result_auto == 1) {
tvResultMedic.setBackgroundColor(resources.getColor(R.color.real_green))
tvResultMedic.setTextColor(resources.getColor(R.color.white))
} else {
tvResultMedic.setBackgroundColor(resources.getColor(R.color.dark_red))
tvResultMedic.setTextColor(resources.getColor(R.color.white))
}
if (!dataQR.alcotest.isNullOrEmpty()) {
println("не нул")
tvAlkotest.text = dataQR.alcotest
tvSyspressure.text = dataQR.syspressure
tvDiapressure.text = dataQR.diapressure
tvPulse.text = dataQR.pulse
tvCheckupTemperature.text = dataQR.temperature
tvComplaints.text = dataQR.complaints
tvCheckupReference.text = dataQR.epicrisis
} else {
tvCheckupAlkotestTitle.visibility = View.GONE
tvCheckupSyspressureTitle.visibility = View.GONE
tvCheckupDiapressureTitle.visibility = View.GONE
tvCheckupPulseTitle.visibility = View.GONE
tvCheckupTemperatureTitle.visibility = View.GONE
tvComplaintsTitle.visibility = View.GONE
tvCheckupReferenceTitle.visibility = View.GONE
tvAlkotest.visibility = View.GONE
tvSyspressure.visibility = View.GONE
tvDiapressure.visibility = View.GONE
tvPulse.visibility = View.GONE
tvCheckupTemperature.visibility = View.GONE
tvComplaints.visibility = View.GONE
tvCheckupReference.visibility = View.GONE
divider14_.visibility = View.GONE
divider15_.visibility = View.GONE
divider16_.visibility = View.GONE
divider17_.visibility = View.GONE
divider18_.visibility = View.GONE
divider19_.visibility = View.GONE
divider20_.visibility = View.GONE */
} }
@ -233,19 +150,26 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
companion object { companion object {
private const val DATA_QR = "DATA_QR" private var DATA_QR = "DATA_QR"
fun getInstance(dataTech: String?): TechCheckupInfoFragment {
fun getInstance(data: DataTech): TechCheckupInfoFragment {
val gson = Gson() val gson = Gson()
Log.v("TechCheckupInfoFragment", "dataTech = $dataTech") val string: String = gson.toJson(data)
Log.v("COMP", "data = $data")
val string: String = gson.toJson(dataTech) this.DATA_QR = string
return TechCheckupInfoFragment().also { return TechCheckupInfoFragment().also {
Log.v("COMP", "data2 = $data")
it.arguments = Bundle().apply { it.arguments = Bundle().apply {
putString(TechCheckupInfoFragment.DATA_QR, dataTech) Log.v("COMP", "data3 = $data")
putString(DATA_QR, string)
}
Log.v("COMP", "data4 = ${it.requireArguments().getString(DATA_QR)}")
} }
} }
}
private const val PERMISSION_CAMERA_REQUEST = 1 private const val PERMISSION_CAMERA_REQUEST = 1
private const val RATIO_4_3_VALUE = 4.0 / 3.0 private const val RATIO_4_3_VALUE = 4.0 / 3.0

View File

@ -1,5 +1,6 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info
import android.util.Log
import com.arellomobile.mvp.InjectViewState import com.arellomobile.mvp.InjectViewState
import com.google.gson.Gson import com.google.gson.Gson
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
@ -22,6 +23,39 @@ class TechCheckupInfoPresenter(
} }
fun updateTech(id: String, vehicleId: String, date: String, time: String, resultId: String) {
Log.v(
"LOG",
"it id = $id, vehicleId = $vehicleId date = $date, time = $time, resultId = $resultId"
)
disposable += techInteractor
.updateTech(id, vehicleId, date, time, resultId)
.ioToMain()
.doOnSubscribe {
Log.v("LOG", "it 2 = $it")
viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
}
.subscribe({
Log.v("LOG", "it = $it ${it.message}")
}, {
if (it is ApiException) {
if (it.code == RestApiCodes.NotFound.code) {
} else {
this.handleError(it)
}
} else {
this.handleError(it)
}
})
}
fun showCheckUp() { fun showCheckUp() {
val gson = Gson() val gson = Gson()
val data = gson.fromJson(stringId, DataTech::class.java) val data = gson.fromJson(stringId, DataTech::class.java)

View File

@ -15,20 +15,15 @@ import com.bumptech.glide.Glide
import com.google.gson.Gson import com.google.gson.Gson
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import ru.tele2med.mobile.R import ru.tele2med.mobile.R
import ru.tele2med.mobile.domain.entity.DataQR
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
import ru.tele2med.mobile.presentation.util.providePresenter import ru.tele2med.mobile.presentation.util.providePresenter
import kotlinx.android.synthetic.main.fragment_medical_checkup.* import kotlinx.android.synthetic.main.fragment_test_list.*
import kotlinx.android.synthetic.main.toolbar_with_help.* import kotlinx.android.synthetic.main.toolbar_with_help.*
import ru.tele2med.mobile.BuildConfig import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.menu.items.medicalCheckup.MedicalCheckupFragment
import ru.tele2med.mobile.presentation.ui.menu.items.medicalCheckup.MedicalCheckupPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoFragment
class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView { class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
@ -46,7 +41,13 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
override val layoutId: Int override val layoutId: Int
get() = R.layout.fragment_tech_checkup get() = R.layout.fragment_test_list
private val adapter: TestListAdapter by lazy {
TestListAdapter { idcheckup ->
presenter.get(idcheckup)
}
}
private var root: View? = null // create a global variable which will hold your layout private var root: View? = null // create a global variable which will hold your layout
@ -72,15 +73,26 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
} }
} }
} }
recyclerView.adapter = adapter
tvDriverTitle.focusable // tvDriverTitle.focusable
tvDriverTitle.requestFocus() // tvDriverTitle.requestFocus()
presenter.showCheckUp() var dataString = DATA_QR
val gson = Gson()
val data = gson.fromJson(dataString, DataTech::class.java)
presenter.showTech(data.uniq_id)
initRecycler() initRecycler()
} }
override fun showCheckups(list: List<DataShow>) {
Log.v("SHOWCH", "data = $list")
adapter.submitList(list)
}
override fun setRefreshing(flag: Boolean) { override fun setRefreshing(flag: Boolean) {
println("setRefreshing = $flag") println("setRefreshing = $flag")
refresh.isRefreshing = flag refresh.isRefreshing = flag
@ -91,174 +103,39 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
refresh.setOnRefreshListener { refresh.setOnRefreshListener {
println("setOnRefreshListener") println("setOnRefreshListener")
var dataString = DATA_QR
val gson = Gson()
val data = gson.fromJson(dataString, DataTech::class.java)
presenter.showCheckUp() presenter.showTech(data.uniq_id)
} }
} }
@SuppressLint("StringFormatInvalid")
override fun fillData(dataTech: DataTech) {
println("СЕРВЕР = ${prefs.getServer()}")
/* var profilePhoto: String
var profilePhotoUrl: Uri
var checkupPhoto: String
var checkupPhotoUrl: Uri
var checkupVideoString: String
var checkupVideoUrl: Uri
profilePhoto = "${BuildConfig.API_BASE_URL}${dataQR.profilePhoto}"
profilePhotoUrl = profilePhoto.toUri()
checkupPhoto =
"${BuildConfig.API_BASE_URL}${dataQR.checkupPhoto?.replace("/media", "media")}"
checkupPhotoUrl = checkupPhoto.toUri()
checkupVideoString =
"${BuildConfig.API_BASE_URL}${dataQR.checkupVideo?.replace("/media", "media")}"
checkupVideoUrl = checkupVideoString.toUri()
tvMainInfoTitle.requestFocus()
tvMainInfoTitle.text = resources.getString(R.string.block_title_main_info, dataQR.idcheckup)
tvDriverNumber.text = dataQR.login
tvSex.text = dataQR.sex_name
tvSurname.text = dataQR.lastname
tvName.text = dataQR.name
tvPatronymic.text = dataQR.oldlastname
tvBirthday.text = dataQR.birthday
tvOrgName.text = dataQR.organization
tvCheckupDate.text = dataQR.exam_date
tvCheckupBeginTime.text = dataQR.exam_timestart
tvCheckupEndTime.text = dataQR.exam_timeend
tvCheckupType.text = dataQR.inspectiontype
tvCheckupTerminal.text = dataQR.terminal_name
tvCheckupStatus.text = dataQR.exam_state_name
tvCheckupMedic.text = dataQR.medic_fio
tvResultAuto.text = dataQR.exam_result_auto_txt
tvResultMedic.text = dataQR.exam_result_med_txt
tvMedicComment.text = dataQR.medic_comment
tvCheckupResultTime.text = dataQR.exam_result_datetime
// ivCheckupPhoto.setImageURI(checkupPhotoUrl)
val mediaController = MediaController(requireContext())
checkupVideo.setMediaController(mediaController)
mediaController.setMediaPlayer(checkupVideo)
println("гружу видео $checkupVideoUrl")
println("гружу фото $checkupPhotoUrl")
checkupVideo.setVideoURI(checkupVideoUrl)
checkupVideo.start()
// checkupVideo.background = null
println("гружу видео start")
// checkupVideo.background = resources.getDrawable(R.drawable.arrow)
/*() checkupVideo.setOnClickListener {
checkupVideo.background = null
checkupVideo.start()
}
checkupVideo.resume()
checkupVideo.pause() */
Glide.with(this).load(checkupPhoto).into(ivCheckupPhoto);
// Picasso.get().load(checkupPhotoUrl).rotate(0f).into(ivCheckupPhoto)
Picasso.get().load(profilePhotoUrl).into(ivDriverPhoto)
if (dataQR.exam_result_auto == 1) {
tvResultAuto.setBackgroundColor(resources.getColor(R.color.real_green))
tvResultAuto.setTextColor(resources.getColor(R.color.white))
} else {
tvResultAuto.setBackgroundColor(resources.getColor(R.color.dark_red))
tvResultAuto.setTextColor(resources.getColor(R.color.white))
}
if (dataQR.exam_result_auto == 1) {
tvResultMedic.setBackgroundColor(resources.getColor(R.color.real_green))
tvResultMedic.setTextColor(resources.getColor(R.color.white))
} else {
tvResultMedic.setBackgroundColor(resources.getColor(R.color.dark_red))
tvResultMedic.setTextColor(resources.getColor(R.color.white))
}
if (!dataQR.alcotest.isNullOrEmpty()) {
println("не нул")
tvAlkotest.text = dataQR.alcotest
tvSyspressure.text = dataQR.syspressure
tvDiapressure.text = dataQR.diapressure
tvPulse.text = dataQR.pulse
tvCheckupTemperature.text = dataQR.temperature
tvComplaints.text = dataQR.complaints
tvCheckupReference.text = dataQR.epicrisis
} else {
tvCheckupAlkotestTitle.visibility = View.GONE
tvCheckupSyspressureTitle.visibility = View.GONE
tvCheckupDiapressureTitle.visibility = View.GONE
tvCheckupPulseTitle.visibility = View.GONE
tvCheckupTemperatureTitle.visibility = View.GONE
tvComplaintsTitle.visibility = View.GONE
tvCheckupReferenceTitle.visibility = View.GONE
tvAlkotest.visibility = View.GONE
tvSyspressure.visibility = View.GONE
tvDiapressure.visibility = View.GONE
tvPulse.visibility = View.GONE
tvCheckupTemperature.visibility = View.GONE
tvComplaints.visibility = View.GONE
tvCheckupReference.visibility = View.GONE
divider14_.visibility = View.GONE
divider15_.visibility = View.GONE
divider16_.visibility = View.GONE
divider17_.visibility = View.GONE
divider18_.visibility = View.GONE
divider19_.visibility = View.GONE
divider20_.visibility = View.GONE
}*/
}
fun play(view: View?) {
checkupVideo.start()
}
fun pause(view: View?) {
checkupVideo.pause()
}
fun stop(view: View?) {
checkupVideo.stopPlayback()
checkupVideo.resume()
}
override fun getPresenter(): BasePresenter<*>? = null override fun getPresenter(): BasePresenter<*>? = null
companion object { companion object {
private const val DATA_QR = "DATA_QR" private var DATA_QR = "DATA_QR"
fun getInstance(dataTech: String?): TechCheckupTestsFragment { fun getInstance(data: DataTech): TechCheckupTestsFragment {
val gson = Gson() val gson = Gson()
Log.v("TechCheckupTestsFragment", "dataTech = $dataTech") val string: String = gson.toJson(data)
Log.v("COMP", "data = $data")
val string: String = gson.toJson(dataTech) this.DATA_QR = string
return TechCheckupTestsFragment().also { return TechCheckupTestsFragment().also {
it.arguments = Bundle().apply { Log.v("COMP", "data2 = $data")
putString(DATA_QR, dataTech)
}
}
it.arguments = Bundle().apply {
Log.v("COMP", "data3 = $data")
putString(TechCheckupTestsFragment.DATA_QR, string)
}
Log.v("COMP", "data4 = ${it.requireArguments().getString(TechCheckupTestsFragment.DATA_QR)}")
}
} }
private const val PERMISSION_CAMERA_REQUEST = 1 private const val PERMISSION_CAMERA_REQUEST = 1

View File

@ -1,5 +1,6 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests
import android.util.Log
import com.arellomobile.mvp.InjectViewState import com.arellomobile.mvp.InjectViewState
import com.google.gson.Gson import com.google.gson.Gson
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
@ -22,28 +23,27 @@ class TechCheckupTestsPresenter(
} }
fun showCheckUp() { fun showTech(id: String) {
val gson = Gson() Log.v(
val data = gson.fromJson(stringId, DataTech::class.java) "LOG",
println("data stringId = ${stringId}") "it id = $id,"
// viewState.fillData(data) )
viewState.setRefreshing(false)
}
fun get(code: String) {
println("qrcode4 $code")
disposable += techInteractor disposable += techInteractor
.getTech(code) .showTech(id)
.ioToMain() .ioToMain()
.doOnSubscribe { .doOnSubscribe {
Log.v("LOG", "it 2 = $it")
viewState.showLoading() viewState.showLoading()
} }
.doAfterTerminate { .doAfterTerminate {
viewState.hideLoading() viewState.hideLoading()
viewState.setRefreshing(false)
} }
.subscribe({ .subscribe({
Log.v("LOG", "it = $it ${it.message}")
viewState.showCheckups(it.data.data)
}, { }, {
if (it is ApiException) { if (it is ApiException) {
@ -55,6 +55,11 @@ class TechCheckupTestsPresenter(
this.handleError(it) this.handleError(it)
} }
}) })
}
fun get(code: String) {
println("qrcode4 $code")
} }

View File

@ -2,13 +2,13 @@ package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.test
import com.arellomobile.mvp.viewstate.strategy.AddToEndSingleStrategy import com.arellomobile.mvp.viewstate.strategy.AddToEndSingleStrategy
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
import ru.tele2med.mobile.domain.entity.DataQR import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.base.BaseView import ru.tele2med.mobile.presentation.ui.base.BaseView
interface TechCheckupTestsView : BaseView { interface TechCheckupTestsView : BaseView {
fun fillData(dataTech: DataTech) fun showCheckups(list: List<DataShow>)
@StateStrategyType(AddToEndSingleStrategy::class) @StateStrategyType(AddToEndSingleStrategy::class)
fun setRefreshing(flag: Boolean) fun setRefreshing(flag: Boolean)

View File

@ -0,0 +1,60 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import ru.tele2med.mobile.R
import ru.tele2med.mobile.domain.entity.DataShow
class TestListAdapter(
val onItemClick: (checkupId: String) -> Unit
) : ListAdapter<DataShow, TestListAdapter.ViewHolder>(
DIFF_CALLBACK
) {
companion object {
private val DIFF_CALLBACK = object : DiffUtil.ItemCallback<DataShow>() {
override fun areItemsTheSame(p0: DataShow, p1: DataShow): Boolean =
p0.id == p1.id
override fun areContentsTheSame(p0: DataShow, p1: DataShow): Boolean =
p0 == p1
}
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
Log.v("BIND", "onCreateViewHolder")
val inflater = LayoutInflater.from(parent.context)
return ViewHolder(inflater.inflate(R.layout.item_test, parent, false))
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
Log.v("BIND", "override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n")
holder.bind(getItem(position))
}
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
private val testName: TextView = view.findViewById(R.id.tvCheckupName)
private val testResult: TextView = view.findViewById(R.id.tvResult)
init {
view.setOnClickListener {
val list = getItem(adapterPosition)
onItemClick(list.uniq_id)
}
}
fun bind(list: DataShow) {
Log.v("BIND", "list = $list")
testName.text = list.name
testResult.text = list.value
}
}
}

View File

@ -42,12 +42,13 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/carName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:fontFamily="@font/roboto_regular" android:fontFamily="@font/roboto_regular"
android:text="@string/checkup" android:text="Технический осмотр"
android:textColor="#515151" android:textColor="#515151"
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintStart_toEndOf="@+id/imageView5" app:layout_constraintStart_toEndOf="@+id/imageView5"
@ -88,28 +89,18 @@
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:text="@string/block_title_main_info" android:text="Путевой лист:"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvDriverTitle"
style="@style/BlockTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/driver_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMainInfoTitle" />
<TextView <TextView
android:id="@+id/tvDriverNumberTitle" android:id="@+id/tvDriverNumberTitle"
style="@style/BlockValueTitleStyle" style="@style/BlockValueTitleStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/driver_number_title" android:text="Автомобиль:"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDriverTitle" /> app:layout_constraintTop_toBottomOf="@id/tvMainInfoTitle" />
<TextView <TextView
android:id="@+id/tvDriverNumber" android:id="@+id/tvDriverNumber"
@ -127,138 +118,37 @@
app:layout_constraintTop_toBottomOf="@id/tvDriverNumber" /> app:layout_constraintTop_toBottomOf="@id/tvDriverNumber" />
<TextView <TextView
android:id="@+id/tvSexTitle" android:id="@+id/tvDriversTitle"
style="@style/BlockValueTitleStyle" style="@style/BlockValueTitleStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/driver_sex_title" android:text="Водители"
app:layout_constraintTop_toBottomOf="@+id/divider" /> app:layout_constraintTop_toBottomOf="@+id/divider" />
<TextView <TextView
android:id="@+id/tvSex" android:id="@+id/tvDrivers"
style="@style/BlockValueStyle" style="@style/BlockValueStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSexTitle" app:layout_constraintTop_toBottomOf="@id/tvDriversTitle"
tools:text="Мужской" /> tools:text="Иванов, Петров" />
<ImageView
android:id="@+id/ivStatusImage"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginStart="10dp"
app:layout_constraintBottom_toBottomOf="@id/tvSex"
app:layout_constraintStart_toEndOf="@id/tvSex"
app:layout_constraintTop_toTopOf="@id/tvSex"
tools:src="@drawable/ic_task_status_not_started" />
<View <View
android:id="@+id/divider3" android:id="@+id/divider3"
style="@style/BlockValueDividerStyle" style="@style/BlockValueDividerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvSex" /> app:layout_constraintTop_toBottomOf="@id/tvDrivers" />
<TextView
android:id="@+id/tvSurnameTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/driver_surname_title"
app:layout_constraintTop_toBottomOf="@+id/divider3" />
<TextView
android:id="@+id/tvSurname"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvSurnameTitle"
tools:text="Иванов" />
<View
android:id="@+id/divider4"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvSurname" />
<TextView
android:id="@+id/tvNameTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/driver_name_title"
app:layout_constraintTop_toBottomOf="@+id/divider4" />
<TextView
android:id="@+id/tvName"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvNameTitle"
tools:text="Иван" />
<View
android:id="@+id/divider5"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvName" />
<TextView
android:id="@+id/tvPatronymicTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/driver_patronymic_title"
app:layout_constraintTop_toBottomOf="@+id/divider5" />
<TextView
android:id="@+id/tvPatronymic"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvPatronymicTitle"
tools:text="Иванович" />
<View
android:id="@+id/divider6"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvPatronymic" />
<TextView
android:id="@+id/tvBirthdayTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/driver_birthday_title"
app:layout_constraintTop_toBottomOf="@+id/divider6" />
<TextView
android:id="@+id/tvBirthday"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvBirthdayTitle"
tools:text="01.01.1990" />
<View
android:id="@+id/divider7"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvBirthday" />
<TextView <TextView
android:id="@+id/tvOrgNameTitle" android:id="@+id/tvOrgNameTitle"
style="@style/BlockValueTitleStyle" style="@style/BlockValueTitleStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/driver_org_title" android:text="Организация"
app:layout_constraintTop_toBottomOf="@+id/divider7" /> app:layout_constraintTop_toBottomOf="@+id/divider3" />
<TextView <TextView
android:id="@+id/tvOrgName" android:id="@+id/tvOrgName"
@ -266,519 +156,139 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvOrgNameTitle" app:layout_constraintTop_toBottomOf="@id/tvOrgNameTitle"
tools:text="ООО Перевозчик" /> tools:text="Вектор-Нагибатор" />
<View <View
android:id="@+id/divider8" android:id="@+id/divider4"
style="@style/BlockValueDividerStyle" style="@style/BlockValueDividerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvOrgName" /> app:layout_constraintTop_toBottomOf="@id/tvOrgName" />
<TextView <TextView
android:id="@+id/tvCheckupDataTitle" android:id="@+id/tvNumberPLTitle"
style="@style/BlockTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/checkup_info_title"
app:layout_constraintTop_toBottomOf="@id/divider8" />
<TextView
android:id="@+id/tvCheckupDateTitle"
style="@style/BlockValueTitleStyle" style="@style/BlockValueTitleStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/checkup_date_title" android:text="Номер ПЛ"
app:layout_constraintTop_toBottomOf="@+id/tvCheckupDataTitle" /> app:layout_constraintTop_toBottomOf="@+id/divider4" />
<TextView <TextView
android:id="@+id/tvCheckupDate" android:id="@+id/tvNumberPL"
style="@style/BlockValueStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupDateTitle" app:layout_constraintTop_toBottomOf="@id/tvNumberPLTitle"
tools:text="24.01.2021" /> tools:text="23" />
<View <View
android:id="@+id/divider9" android:id="@+id/divider5"
style="@style/SubblockValueDividerStyle" style="@style/BlockValueDividerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupDate" /> app:layout_constraintTop_toBottomOf="@id/tvNumberPL" />
<TextView <TextView
android:id="@+id/tvCheckupBeginTimeTitle" android:id="@+id/tvDatePLTitle"
style="@style/BlockValueTitleStyle" style="@style/BlockValueTitleStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/checkup_begin_time_title" android:text="Дата ПЛ"
app:layout_constraintTop_toBottomOf="@+id/divider9" /> app:layout_constraintTop_toBottomOf="@+id/divider5" />
<TextView <TextView
android:id="@+id/tvCheckupBeginTime" android:id="@+id/tvDatePL"
style="@style/BlockValueStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupBeginTimeTitle" app:layout_constraintTop_toBottomOf="@id/tvDatePLTitle"
tools:text="11:32:34" /> tools:text="18.04.2024" />
<View <View
android:id="@+id/divider10" android:id="@+id/divider6"
style="@style/BlockValueDividerStyle" style="@style/BlockValueDividerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupBeginTime" /> app:layout_constraintTop_toBottomOf="@id/tvDatePL" />
<TextView
android:id="@+id/tvCheckupEndTimeTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_end_time_title"
app:layout_constraintTop_toBottomOf="@+id/divider10" />
<TextView
android:id="@+id/tvCheckupEndTime"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupEndTimeTitle"
tools:text="11:33:50" />
<View
android:id="@+id/divider11"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupEndTime" />
<TextView
android:id="@+id/tvCheckupTypeTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_type_title"
app:layout_constraintTop_toBottomOf="@+id/divider11" />
<TextView
android:id="@+id/tvCheckupType"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupTypeTitle"
tools:text="Предрейсовый" />
<View
android:id="@+id/divider12"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupType" />
<TextView
android:id="@+id/tvCheckupTerminalTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_terminal_title"
app:layout_constraintTop_toBottomOf="@+id/divider12" />
<TextView
android:id="@+id/tvCheckupTerminal"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupTerminalTitle"
tools:text="АРМ 2" />
<View
android:id="@+id/divider13"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupTerminal" />
<TextView
android:id="@+id/tvCheckupStatusTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_status_title"
app:layout_constraintTop_toBottomOf="@+id/divider13" />
<TextView
android:id="@+id/tvCheckupStatus"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupStatusTitle"
tools:text="Подписан телемедиком" />
<View
android:id="@+id/divider14"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupStatus" />
<TextView
android:id="@+id/tvCheckupSyspressureTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_syspressure_title"
app:layout_constraintTop_toBottomOf="@+id/divider14" />
<TextView
android:id="@+id/tvSyspressure"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupSyspressureTitle"
tools:text="120" />
<View
android:id="@+id/divider14_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvSyspressure" />
<TextView
android:id="@+id/tvCheckupDiapressureTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_diapressure_title"
app:layout_constraintTop_toBottomOf="@+id/divider14_" />
<TextView
android:id="@+id/tvDiapressure"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupDiapressureTitle"
tools:text="80" />
<View
android:id="@+id/divider15_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvDiapressure" />
<TextView
android:id="@+id/tvCheckupPulseTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_pulse_title"
app:layout_constraintTop_toBottomOf="@+id/divider15_" />
<TextView
android:id="@+id/tvPulse"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupPulseTitle"
tools:text="65" />
<View
android:id="@+id/divider16_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvPulse" />
<TextView
android:id="@+id/tvCheckupAlkotestTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_alcotest_title"
app:layout_constraintTop_toBottomOf="@+id/divider16_" />
<TextView
android:id="@+id/tvAlkotest"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupAlkotestTitle"
tools:text="0" />
<View
android:id="@+id/divider17_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvAlkotest" />
<TextView
android:id="@+id/tvCheckupTemperatureTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_temperature_title"
app:layout_constraintTop_toBottomOf="@+id/divider17_" />
<TextView
android:id="@+id/tvCheckupTemperature"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupTemperatureTitle"
tools:text="36,6" />
<View
android:id="@+id/divider18_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupTemperature" />
<TextView
android:id="@+id/tvComplaintsTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_complaints_title"
app:layout_constraintTop_toBottomOf="@+id/divider18_" />
<TextView
android:id="@+id/tvComplaints"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvComplaintsTitle"
tools:text="Жалоб нет" />
<View
android:id="@+id/divider19_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvComplaints" />
<TextView
android:id="@+id/tvCheckupReferenceTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_reference_title"
app:layout_constraintTop_toBottomOf="@+id/divider19_" />
<TextView
android:id="@+id/tvCheckupReference"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupReferenceTitle"
tools:text="" />
<View
android:id="@+id/divider20_"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupReference" />
<TextView
android:id="@+id/tvCheckupMedicTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_medic_title"
app:layout_constraintTop_toBottomOf="@+id/divider20_" />
<TextView
android:id="@+id/tvCheckupMedic"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupMedicTitle"
tools:text="Лечебная Марья Ивановна" />
<View
android:id="@+id/divider15"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupMedic" />
<TextView
android:id="@+id/tvResultAutoTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_result_auto_title"
app:layout_constraintTop_toBottomOf="@+id/divider15" />
<TextView
android:id="@+id/tvResultAuto"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvResultAutoTitle"
tools:text="Допущен" />
<View
android:id="@+id/divider16"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvResultAuto" />
<TextView
android:id="@+id/tvResultMedicTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_result_medic_title"
app:layout_constraintTop_toBottomOf="@+id/divider16" />
<TextView
android:id="@+id/tvResultMedic"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvResultMedicTitle"
tools:text="Допущен" />
<View
android:id="@+id/divider17"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvResultMedic" />
<TextView
android:id="@+id/tvMedicCommentTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_medic_comment_title"
app:layout_constraintTop_toBottomOf="@+id/divider17" />
<TextView
android:id="@+id/tvMedicComment"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvMedicCommentTitle"
tools:text="Допущен" />
<View
android:id="@+id/divider18"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvMedicComment" />
<TextView
android:id="@+id/tvCheckupResultTimeTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_result_time_title"
app:layout_constraintTop_toBottomOf="@+id/divider18" />
<TextView
android:id="@+id/tvCheckupResultTime"
style="@style/BlockValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvCheckupResultTimeTitle"
tools:text="24.01.2022 12:32:06" />
<View
android:id="@+id/divider19"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/tvCheckupResultTime" />
<TextView
android:id="@+id/ivCheckupPhotoTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkup_photo_title"
app:layout_constraintTop_toBottomOf="@+id/divider19" />
<ImageView
android:id="@+id/ivCheckupPhoto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/ivCheckupPhotoTitle" />
<View
android:id="@+id/divider20"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/ivCheckupPhoto" />
<TextView
android:id="@+id/checkupVideoTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/driver_video_title"
app:layout_constraintTop_toBottomOf="@+id/divider20" />
<VideoView
android:id="@+id/checkupVideo"
android:layout_width="wrap_content"
android:layout_height="300dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/checkupVideoTitle" />
<View
android:id="@+id/divider21"
style="@style/BlockValueDividerStyle"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintTop_toBottomOf="@id/checkupVideo" />
<TextView
android:id="@+id/ivDriverPhotoTitle"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/driver_photo_title"
app:layout_constraintTop_toBottomOf="@+id/divider21" />
<ImageView
android:id="@+id/ivDriverPhoto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/ivDriverPhotoTitle" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:id="@+id/startTest"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="Начать проверки"
android:textColor="@color/white"
android:textSize="12sp"
android:background="@drawable/btn_rounded_blue"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cvMainInfoContainer" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvStatusInfoContainer"
style="@style/BlockStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/checkupsBody">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tvStatusInfoTitle"
style="@style/BlockTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="Статус:"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvStatusName"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="В работе"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvStatusInfoTitle" />
<TextView
android:id="@+id/tvStatusTest"
style="@style/BlockValueTitleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Продено 2 проверки"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvStatusName" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:id="@+id/parent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:clipToPadding="false"
android:paddingTop="4dp"
tools:listitem="@layout/item_test" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</RelativeLayout>

View File

@ -0,0 +1,44 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:background="@drawable/ic_notification_background"
android:padding="18dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="match_parent">
<TextView
android:id="@+id/tvCheckupName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_medium"
android:textColor="@color/gray_checkups"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="№ 23421" />
<TextView
android:id="@+id/tvResult"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/roboto_regular"
android:textColor="@color/fio_color"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvCheckupName"
tools:text="Иванов Иван Иоанович" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>