Функционал механика ч.1
This commit is contained in:
parent
c1f9211fdf
commit
9b567ff5f8
@ -169,6 +169,8 @@ def getVersionNumber() {
|
|||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "http://maven.google.com/"
|
url "http://maven.google.com/"
|
||||||
|
allowInsecureProtocol = true
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@
|
|||||||
<string name="exit">Выйти</string>
|
<string name="exit">Выйти</string>
|
||||||
<string name="search_bt">Поиск устройства</string>
|
<string name="search_bt">Поиск устройства</string>
|
||||||
<string name="search_printer">Поиск принтера</string>
|
<string name="search_printer">Поиск принтера</string>
|
||||||
|
<string name="tech_checkup">Технический осмотр</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="open_drawer">Открыть боковое меню</string>
|
<string name="open_drawer">Открыть боковое меню</string>
|
||||||
@ -256,6 +257,9 @@
|
|||||||
<string name="sos_toolbar">SOS</string>
|
<string name="sos_toolbar">SOS</string>
|
||||||
<string name="sos">sos</string>
|
<string name="sos">sos</string>
|
||||||
|
|
||||||
|
<string name="park_toolbar">Парк</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="params">Параметры</string>
|
<string name="params">Параметры</string>
|
||||||
<string name="panel">Сводная панель</string>
|
<string name="panel">Сводная панель</string>
|
||||||
@ -335,6 +339,13 @@
|
|||||||
<string name="task_block_title_check_in">Заезд в гараж/следующее место работ</string>
|
<string name="task_block_title_check_in">Заезд в гараж/следующее место работ</string>
|
||||||
<string name="task_block_value_title_check_in_date_time">Дата и время заезда</string>
|
<string name="task_block_value_title_check_in_date_time">Дата и время заезда</string>
|
||||||
|
|
||||||
|
<string name="checkups_list_title">Осмотры</string>
|
||||||
|
|
||||||
|
<string name="checkups_info_title">Информация</string>
|
||||||
|
<string name="checkups_tests_title">Проверки</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="tasks_map_title">На карте</string>
|
<string name="tasks_map_title">На карте</string>
|
||||||
<string name="tasks_list_title">Списком</string>
|
<string name="tasks_list_title">Списком</string>
|
||||||
<string name="task_title_placeholder">Задание %1$d</string>
|
<string name="task_title_placeholder">Задание %1$d</string>
|
||||||
|
@ -275,6 +275,35 @@ interface ApiService {
|
|||||||
@Url url: Uri
|
@Url url: Uri
|
||||||
): Completable
|
): Completable
|
||||||
|
|
||||||
|
|
||||||
|
@Multipart
|
||||||
|
// @POST("https://pdn.tele2med.ru/api3_/mobile/medicalCheckup")
|
||||||
|
@POST("${API_BASE_URL}waybills/tech_control/list")
|
||||||
|
fun getTechCheckupList(
|
||||||
|
@Part("filter") filter: RequestBody? = null,
|
||||||
|
@Part("offset") offset: RequestBody? = null,
|
||||||
|
@Part("limit") limit: RequestBody? = null,
|
||||||
|
@Part("tokenApp") tokenApp: RequestBody?,
|
||||||
|
@Part("sessId") sessId: RequestBody?,
|
||||||
|
@Part("uuid") uuid: RequestBody,
|
||||||
|
@Part("appUniqID") appUniqID: RequestBody,
|
||||||
|
@Header("token") token: String? = "iddqd",
|
||||||
|
@Header("Authorization") tokenUser: String?
|
||||||
|
): Single<TechCheckupsListResponse>
|
||||||
|
|
||||||
|
|
||||||
|
@Multipart
|
||||||
|
@POST("${API_BASE_URL}waybills/tech_control/show/{uniq_id}")
|
||||||
|
fun getTech(
|
||||||
|
@Path("uniq_id") uuid: String?,
|
||||||
|
@Part("tokenApp") tokenApp: RequestBody?,
|
||||||
|
@Part("sessId") sessId: RequestBody?,
|
||||||
|
@Part("appUniqID") appUniqID: RequestBody,
|
||||||
|
@Header("token") token: String? = "iddqd",
|
||||||
|
@Header("Authorization") tokenUser: String?
|
||||||
|
): Single<TechResponse>
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-- Дальше OLD --*/
|
/*-- Дальше OLD --*/
|
||||||
|
@ -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
data class TechCheckupsListResponse(
val af: String,
val status: String,
val data: List<DataTechCheckup>,
val total_count: Int,
val message: String
)
|
@ -0,0 +1 @@
|
|||||||
|
package ru.tele2med.mobile.data.api.entity.response
import ru.tele2med.mobile.domain.entity.DataQR
import ru.tele2med.mobile.domain.entity.DataTech
data class TechResponse(
val af: String,
val status: String,
val message: String,
val data: DataTech
)
|
@ -69,6 +69,24 @@ class DataConverter {
|
|||||||
total_count = list.total_count
|
total_count = list.total_count
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun toTechCheckupListAll(list: TechCheckupsListResponse): TechCheckupList =
|
||||||
|
TechCheckupList(
|
||||||
|
af = list.af,
|
||||||
|
status = list.status,
|
||||||
|
data = list.data,
|
||||||
|
total_count = list.total_count,
|
||||||
|
message = list.message
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
fun toTech(tech: TechResponse): Tech =
|
||||||
|
Tech(
|
||||||
|
af = tech.af,
|
||||||
|
status = tech.status,
|
||||||
|
message = tech.message,
|
||||||
|
data = tech.data
|
||||||
|
)
|
||||||
|
|
||||||
fun toDashboard(data: DashboardListResponse): DashboardResponseDto =
|
fun toDashboard(data: DashboardListResponse): DashboardResponseDto =
|
||||||
DashboardResponseDto(
|
DashboardResponseDto(
|
||||||
af = data.af,
|
af = data.af,
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
package ru.tele2med.mobile.data.repository
|
||||||
|
|
||||||
|
import io.reactivex.Single
|
||||||
|
import okhttp3.MediaType
|
||||||
|
import okhttp3.RequestBody
|
||||||
|
import ru.tele2med.mobile.BuildConfig
|
||||||
|
import ru.tele2med.mobile.data.api.ApiService
|
||||||
|
import ru.tele2med.mobile.domain.entity.DefaultResponseDto
|
||||||
|
import ru.tele2med.mobile.domain.entity.ServerMessage
|
||||||
|
import ru.tele2med.mobile.domain.repository.SosRepository
|
||||||
|
import ru.tele2med.mobile.presentation.util.Prefs
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
class SosRepositoryImpl(
|
||||||
|
private val apiService: ApiService,
|
||||||
|
private val dataConverter: DataConverter,
|
||||||
|
private val prefs: Prefs
|
||||||
|
) : SosRepository {
|
||||||
|
|
||||||
|
val uuid = prefs.getUuid() ?: ""
|
||||||
|
val tokenApp = BuildConfig.TOKEN_APP
|
||||||
|
val tokenUser = prefs.getTokenUser()
|
||||||
|
override fun sendSos(lat: Double, lon: Double, message: String): Single<DefaultResponseDto> {
|
||||||
|
TODO("Not yet implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
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.presentation.util.Prefs
|
||||||
|
import io.reactivex.Single
|
||||||
|
import okhttp3.MediaType
|
||||||
|
import okhttp3.RequestBody
|
||||||
|
import ru.tele2med.mobile.data.api.ApiService
|
||||||
|
import ru.tele2med.mobile.domain.entity.Tech
|
||||||
|
import ru.tele2med.mobile.domain.entity.TechCheckupList
|
||||||
|
import ru.tele2med.mobile.domain.repository.TechRepository
|
||||||
|
|
||||||
|
|
||||||
|
class TechRepositoryImpl(
|
||||||
|
private val apiService: ApiService,
|
||||||
|
private val dataConverter: DataConverter,
|
||||||
|
private val prefs: Prefs
|
||||||
|
) : TechRepository {
|
||||||
|
|
||||||
|
val tokenApp = ru.tele2med.mobile.BuildConfig.TOKEN_APP
|
||||||
|
|
||||||
|
|
||||||
|
override fun getTech(id: String): Single<Tech> =
|
||||||
|
apiService
|
||||||
|
.getTech(
|
||||||
|
uuid = id,
|
||||||
|
sessId = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
prefs.getSessId().toString()
|
||||||
|
),
|
||||||
|
tokenApp = RequestBody.create(MediaType.parse("text/plain"), tokenApp),
|
||||||
|
tokenUser = "Bearer ${prefs.getTokenUser().toString()}",
|
||||||
|
appUniqID = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
prefs.getAppUniqId().toString()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.map(dataConverter::toTech)
|
||||||
|
|
||||||
|
|
||||||
|
override fun getTechCheckupAll(offset: Int, limit: Int): Single<TechCheckupList> =
|
||||||
|
apiService
|
||||||
|
.getTechCheckupList(
|
||||||
|
limit = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
limit.toString()
|
||||||
|
),
|
||||||
|
offset = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
offset.toString()
|
||||||
|
),
|
||||||
|
sessId = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
prefs.getSessId().toString()
|
||||||
|
),
|
||||||
|
uuid = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
prefs.getUuid().toString()
|
||||||
|
),
|
||||||
|
tokenApp = RequestBody.create(MediaType.parse("text/plain"), tokenApp),
|
||||||
|
tokenUser = "Bearer ${prefs.getTokenUser().toString()}",
|
||||||
|
appUniqID = RequestBody.create(
|
||||||
|
MediaType.parse("text/plain"),
|
||||||
|
prefs.getAppUniqId().toString()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.map(dataConverter::toTechCheckupListAll)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -16,7 +16,9 @@ fun interactorModule() = Kodein.Module(name = "interactorModule") {
|
|||||||
DashboardInteractor(instance())
|
DashboardInteractor(instance())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bind() from provider {
|
||||||
|
TechInteractor(instance())
|
||||||
|
}
|
||||||
|
|
||||||
bind() from provider {
|
bind() from provider {
|
||||||
QRInteractor(instance())
|
QRInteractor(instance())
|
||||||
|
@ -47,6 +47,12 @@ import ru.tele2med.mobile.presentation.ui.menu.items.rfid.RfidPresenter
|
|||||||
import ru.tele2med.mobile.presentation.ui.menu.items.settingsLc.SettingsLcPresenter
|
import ru.tele2med.mobile.presentation.ui.menu.items.settingsLc.SettingsLcPresenter
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.settingsReview.SettingsReviewPresenter
|
import ru.tele2med.mobile.presentation.ui.menu.items.settingsReview.SettingsReviewPresenter
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.status.statusList.StatusListPresenter
|
import ru.tele2med.mobile.presentation.ui.menu.items.status.statusList.StatusListPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.TechPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.TechListPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.park.ParkPresenter
|
||||||
import ru.tele2med.mobile.presentation.ui.models.UiConverter
|
import ru.tele2med.mobile.presentation.ui.models.UiConverter
|
||||||
import ru.tele2med.mobile.presentation.ui.splash.SplashPresenter
|
import ru.tele2med.mobile.presentation.ui.splash.SplashPresenter
|
||||||
import ru.tele2med.mobile.presentation.util.MyDialogPresenter
|
import ru.tele2med.mobile.presentation.util.MyDialogPresenter
|
||||||
@ -57,6 +63,35 @@ fun presenterModule() = Kodein.Module(name = "presenterModule") {
|
|||||||
QrPresenter(instance(), instance(), instance())
|
QrPresenter(instance(), instance(), instance())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bind() from provider {
|
||||||
|
TechListPresenter(instance(), instance(), instance())
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() from factory { stringId: String ->
|
||||||
|
TechCheckupInfoPresenter(instance(), instance(), stringId)
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() from factory { stringId: String ->
|
||||||
|
TechCheckupTestsPresenter(instance(), instance(), stringId)
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() from provider {
|
||||||
|
ParkPresenter(instance(), instance(), instance())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bind() from provider {
|
||||||
|
TechPresenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() from factory { stringId: String ->
|
||||||
|
TechCheckupPresenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind() from provider {
|
bind() from provider {
|
||||||
QrReviewPresenter(instance(), instance(), instance())
|
QrReviewPresenter(instance(), instance(), instance())
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,8 @@ fun repoModule() = Kodein.Module(name = "repoModule") {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind<UploadFirstPhotoRepository>() with singleton {
|
bind<UploadFirstPhotoRepository>() with singleton {
|
||||||
UploadFirstPhotoRepositoryImpl(
|
UploadFirstPhotoRepositoryImpl(
|
||||||
instance(),
|
instance(),
|
||||||
@ -81,6 +83,22 @@ fun repoModule() = Kodein.Module(name = "repoModule") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bind<SosRepository>() with singleton {
|
||||||
|
SosRepositoryImpl(
|
||||||
|
instance(),
|
||||||
|
instance(),
|
||||||
|
instance()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
bind<TechRepository>() with singleton {
|
||||||
|
TechRepositoryImpl(
|
||||||
|
instance(),
|
||||||
|
instance(),
|
||||||
|
instance()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind<UpdatesRepository>() with singleton {
|
bind<UpdatesRepository>() with singleton {
|
||||||
@ -116,6 +134,4 @@ fun repoModule() = Kodein.Module(name = "repoModule") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package ru.tele2med.mobile.domain.entity
|
||||||
|
|
||||||
|
data class DataTech(
|
||||||
|
val id: String,
|
||||||
|
val uniq_id: String,
|
||||||
|
val vehicle_id: String,
|
||||||
|
val inspectiontype: String,
|
||||||
|
val vehicle_name: String,
|
||||||
|
val waybill_uuid: String,
|
||||||
|
val waybill_name: String,
|
||||||
|
val organization_id: String,
|
||||||
|
val mechanic_id: String,
|
||||||
|
val mechanic_name: String,
|
||||||
|
val result_id: String,
|
||||||
|
val result_name: String,
|
||||||
|
val checklist_uuid: String,
|
||||||
|
val datetime: String,
|
||||||
|
val date_create: String,
|
||||||
|
val date_update: String,
|
||||||
|
val date_delete: String,
|
||||||
|
val enabled: String,
|
||||||
|
val exam_state: String,
|
||||||
|
val exam_state_name: String,
|
||||||
|
val exam_state_description: String,
|
||||||
|
val date_: String,
|
||||||
|
val time_: String
|
||||||
|
)
|
@ -0,0 +1,8 @@
|
|||||||
|
package ru.tele2med.mobile.domain.entity
|
||||||
|
|
||||||
|
data class Tech(
|
||||||
|
val af: String,
|
||||||
|
val status: String,
|
||||||
|
val message: String,
|
||||||
|
val data: DataTech
|
||||||
|
)
|
@ -4,6 +4,7 @@ import ru.tele2med.mobile.domain.entity.MedicalCheckupList
|
|||||||
import ru.tele2med.mobile.domain.entity.QR
|
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.TechCheckupList
|
import ru.tele2med.mobile.domain.entity.TechCheckupList
|
||||||
import ru.tele2med.mobile.domain.repository.TechRepository
|
import ru.tele2med.mobile.domain.repository.TechRepository
|
||||||
|
|
||||||
@ -12,9 +13,7 @@ class TechInteractor(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
fun getQR(qrcode: String): Single<QR> = techRepository.getQR(qrcode)
|
fun getTech(id: String): Single<Tech> = techRepository.getTech(id)
|
||||||
fun getQRProd(qrcode: String): Single<QR> = techRepository.getQRProd(qrcode)
|
|
||||||
|
|
||||||
fun getTechCheckupList(offset: Int, limit: Int): Single<TechCheckupList> =
|
fun getTechCheckupList(offset: Int, limit: Int): Single<TechCheckupList> =
|
||||||
techRepository.getTechCheckupAll(offset, limit)
|
techRepository.getTechCheckupAll(offset, limit)
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@ package ru.tele2med.mobile.domain.repository
|
|||||||
import ru.tele2med.mobile.domain.entity.MedicalCheckupList
|
import ru.tele2med.mobile.domain.entity.MedicalCheckupList
|
||||||
import ru.tele2med.mobile.domain.entity.QR
|
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.TechCheckupList
|
import ru.tele2med.mobile.domain.entity.TechCheckupList
|
||||||
|
|
||||||
interface TechRepository {
|
interface TechRepository {
|
||||||
fun getQR(qrcode: String): Single<QR>
|
fun getTech(id: String): Single<Tech>
|
||||||
fun getQRProd(qrcode: String): Single<QR>
|
|
||||||
fun getTechCheckupAll(offset: Int, limit: Int): Single<TechCheckupList>
|
fun getTechCheckupAll(offset: Int, limit: Int): Single<TechCheckupList>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ru.tele2med.mobile.presentation.router
|
package ru.tele2med.mobile.presentation.router
|
||||||
|
|
||||||
import ru.tele2med.mobile.domain.entity.DataQR
|
import ru.tele2med.mobile.domain.entity.DataQR
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
import ru.terrakok.cicerone.Router
|
import ru.terrakok.cicerone.Router
|
||||||
|
|
||||||
class NavRouter : Router() {
|
class NavRouter : Router() {
|
||||||
@ -117,6 +118,11 @@ class NavRouter : Router() {
|
|||||||
navigateTo(NavScreens.getMedicalCheckup(dataQR))
|
navigateTo(NavScreens.getMedicalCheckup(dataQR))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun openTechCheckupScreen(dataTech: DataTech) {
|
||||||
|
navigateTo(NavScreens.getTechCheckup(dataTech))
|
||||||
|
}
|
||||||
|
|
||||||
fun openMedicalCheckupsScreen() {
|
fun openMedicalCheckupsScreen() {
|
||||||
navigateTo(NavScreens.getMedicalCheckups())
|
navigateTo(NavScreens.getMedicalCheckups())
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ru.tele2med.mobile.presentation.router
|
package ru.tele2med.mobile.presentation.router
|
||||||
|
|
||||||
import ru.tele2med.mobile.domain.entity.DataQR
|
import ru.tele2med.mobile.domain.entity.DataQR
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
import ru.tele2med.mobile.presentation.ui.auth.login.LoginScreen
|
import ru.tele2med.mobile.presentation.ui.auth.login.LoginScreen
|
||||||
import ru.tele2med.mobile.presentation.ui.auth.number_enter.NumberEnterScreen
|
import ru.tele2med.mobile.presentation.ui.auth.number_enter.NumberEnterScreen
|
||||||
import ru.tele2med.mobile.presentation.ui.auth.pin_change.PinChangeScreen
|
import ru.tele2med.mobile.presentation.ui.auth.pin_change.PinChangeScreen
|
||||||
@ -38,6 +39,7 @@ import ru.tele2med.mobile.presentation.ui.menu.items.sos.SosScreen
|
|||||||
import ru.tele2med.mobile.presentation.ui.menu.items.stats.StatsScreen
|
import ru.tele2med.mobile.presentation.ui.menu.items.stats.StatsScreen
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.status.StatusesScreen
|
import ru.tele2med.mobile.presentation.ui.menu.items.status.StatusesScreen
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.tech.TechScreen
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.TechScreen
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupScreen
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.tonometr.TonScreen
|
import ru.tele2med.mobile.presentation.ui.menu.items.tonometr.TonScreen
|
||||||
|
|
||||||
object NavScreens {
|
object NavScreens {
|
||||||
@ -89,6 +91,8 @@ object NavScreens {
|
|||||||
|
|
||||||
fun getMedicalCheckup(dataQR: DataQR): MedicalCheckupScreen = MedicalCheckupScreen(dataQR)
|
fun getMedicalCheckup(dataQR: DataQR): MedicalCheckupScreen = MedicalCheckupScreen(dataQR)
|
||||||
|
|
||||||
|
fun getTechCheckup(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech)
|
||||||
|
|
||||||
fun getMedicalCheckups(): CheckupsScreen = CheckupsScreen()
|
fun getMedicalCheckups(): CheckupsScreen = CheckupsScreen()
|
||||||
|
|
||||||
fun getAlkoScreen(): AlkoScreen = AlkoScreen()
|
fun getAlkoScreen(): AlkoScreen = AlkoScreen()
|
||||||
|
@ -173,7 +173,7 @@ class SplashAuth0Activity : BaseActivity(), SplashAuth0View {
|
|||||||
URL?.let { intent.launchUrl(this@SplashAuth0Activity, it) }
|
URL?.let { intent.launchUrl(this@SplashAuth0Activity, it) }
|
||||||
|
|
||||||
|
|
||||||
val action: String? = intent?.intent.action
|
val action: String? = intent.intent.action
|
||||||
val data: Uri? = intent.intent.data
|
val data: Uri? = intent.intent.data
|
||||||
|
|
||||||
println("actionSplash = $action")
|
println("actionSplash = $action")
|
||||||
|
@ -28,7 +28,11 @@ abstract class BasePresenter<View : BaseView> : MvpPresenter<View>() {
|
|||||||
when (t) {
|
when (t) {
|
||||||
is ApiException -> viewState.showError(t.message)
|
is ApiException -> viewState.showError(t.message)
|
||||||
is IOException -> viewState.showError(R.string.not_internet_connection)
|
is IOException -> viewState.showError(R.string.not_internet_connection)
|
||||||
else -> viewState.showError(R.string.something_wrong)
|
else -> if (t.message != null) {
|
||||||
|
viewState.showError(t.message!!)
|
||||||
|
} else {
|
||||||
|
viewState.showError(R.string.something_wrong)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,13 +15,11 @@ 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_dashboard.*
|
|
||||||
import kotlinx.android.synthetic.main.fragment_hello.recyclerView
|
import kotlinx.android.synthetic.main.fragment_hello.recyclerView
|
||||||
import kotlinx.android.synthetic.main.toolbar_with_help.*
|
import kotlinx.android.synthetic.main.toolbar_with_help.*
|
||||||
import org.jetbrains.anko.clearTask
|
import org.jetbrains.anko.clearTask
|
||||||
import org.jetbrains.anko.intentFor
|
import org.jetbrains.anko.intentFor
|
||||||
import org.jetbrains.anko.newTask
|
import org.jetbrains.anko.newTask
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.tech.CheckupsView
|
|
||||||
|
|
||||||
|
|
||||||
class CheckupsFragment : BaseMenuFragment(), CheckupsView {
|
class CheckupsFragment : BaseMenuFragment(), CheckupsView {
|
||||||
|
@ -10,7 +10,6 @@ import ru.tele2med.mobile.presentation.ui.models.UiConverter
|
|||||||
import ru.tele2med.mobile.presentation.util.ioToMain
|
import ru.tele2med.mobile.presentation.util.ioToMain
|
||||||
import io.reactivex.rxkotlin.plusAssign
|
import io.reactivex.rxkotlin.plusAssign
|
||||||
import ru.tele2med.mobile.data.api.entity.exception.ApiException
|
import ru.tele2med.mobile.data.api.entity.exception.ApiException
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.tech.CheckupsView
|
|
||||||
|
|
||||||
@InjectViewState
|
@InjectViewState
|
||||||
class CheckupsPresenter(
|
class CheckupsPresenter(
|
||||||
|
@ -1,94 +1,52 @@
|
|||||||
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
||||||
|
|
||||||
import android.view.LayoutInflater
|
import android.content.Context
|
||||||
import android.view.View
|
import android.os.Bundle
|
||||||
import android.view.ViewGroup
|
import androidx.fragment.app.Fragment
|
||||||
import android.widget.ImageView
|
import androidx.fragment.app.FragmentManager
|
||||||
import android.widget.TextView
|
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||||
import androidx.core.content.ContextCompat
|
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
|
||||||
import androidx.recyclerview.widget.ListAdapter
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import ru.tele2med.mobile.R
|
import ru.tele2med.mobile.R
|
||||||
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.TechListFragment
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.park.ParkFragment
|
||||||
|
|
||||||
class TechAdapter(
|
class TechAdapter(val context: Context, fm: FragmentManager) : FragmentStatePagerAdapter(fm) {
|
||||||
val onItemClick: (checkupId: String) -> Unit
|
|
||||||
) : ListAdapter<DataTechCheckup, TechAdapter.ViewHolder>(
|
|
||||||
DIFF_CALLBACK
|
|
||||||
) {
|
|
||||||
companion object {
|
|
||||||
private val DIFF_CALLBACK = object : DiffUtil.ItemCallback<DataTechCheckup>() {
|
|
||||||
override fun areItemsTheSame(p0: DataTechCheckup, p1: DataTechCheckup): Boolean =
|
|
||||||
p0.id == p1.id
|
|
||||||
|
|
||||||
override fun areContentsTheSame(p0: DataTechCheckup, p1: DataTechCheckup): Boolean =
|
private var fragments: MutableList<Fragment> = mutableListOf()
|
||||||
p0 == p1
|
|
||||||
|
override fun getItem(position: Int): Fragment {
|
||||||
|
return when (position) {
|
||||||
|
0 -> {
|
||||||
|
val fragment = TechListFragment.getInstance()
|
||||||
|
|
||||||
|
val arguments = Bundle()
|
||||||
|
fragment.arguments = arguments
|
||||||
|
fragments.add(fragment)
|
||||||
|
fragment
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
val fragment = ParkFragment.getInstance()
|
||||||
|
val arguments = Bundle()
|
||||||
|
fragment.arguments = arguments
|
||||||
|
fragments.add(fragment)
|
||||||
|
fragment
|
||||||
|
}
|
||||||
|
else -> throw Exception(context.getString(R.string.unexpected_page))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun getCount(): Int {
|
||||||
val inflater = LayoutInflater.from(parent.context)
|
return 2
|
||||||
return ViewHolder(inflater.inflate(R.layout.item_checkup, parent, false))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun getPageTitle(position: Int): CharSequence? {
|
||||||
holder.bind(getItem(position))
|
val tabTitles = listOf(
|
||||||
}
|
context.getString(R.string.checkups_list_title),
|
||||||
|
context.getString(R.string.park_toolbar)
|
||||||
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
|
||||||
private val checkupId: TextView = view.findViewById(R.id.tvCheckupId)
|
|
||||||
private val time: TextView = view.findViewById(R.id.tvTime)
|
|
||||||
private val fio: TextView = view.findViewById(R.id.tvFio)
|
|
||||||
private val eye: ImageView = view.findViewById(R.id.ivEye)
|
|
||||||
private val auto: ImageView = view.findViewById(R.id.ivAuto)
|
|
||||||
private val medic: ImageView = view.findViewById(R.id.ivTelemedic)
|
|
||||||
private val battery: ImageView = view.findViewById(R.id.ivBattery)
|
|
||||||
|
|
||||||
|
|
||||||
init {
|
|
||||||
view.setOnClickListener {
|
|
||||||
val notification = getItem(adapterPosition)
|
|
||||||
onItemClick(notification.uniq_id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun bind(notification: DataTechCheckup) {
|
|
||||||
checkupId.text = "№ ${notification.id}"
|
|
||||||
time.text = notification.endmeasurmenttime
|
|
||||||
fio.text = notification.fio
|
|
||||||
|
|
||||||
eye.setImageDrawable(
|
|
||||||
ContextCompat.getDrawable(
|
|
||||||
itemView.context,
|
|
||||||
if (notification.recognize == "1") R.drawable.ic_green_eye else R.drawable.ic_red_eye
|
|
||||||
)
|
)
|
||||||
)
|
return when (position) {
|
||||||
|
0 -> tabTitles.first()
|
||||||
auto.setImageDrawable(
|
1 -> tabTitles.last()
|
||||||
ContextCompat.getDrawable(
|
else -> throw Exception(context.getString(R.string.unexpected_page))
|
||||||
itemView.context,
|
|
||||||
if (notification.exam_result_auto == "1") R.drawable.ic_green_auto else R.drawable.ic_red_auto
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
medic.setImageDrawable(
|
|
||||||
ContextCompat.getDrawable(
|
|
||||||
itemView.context,
|
|
||||||
if (notification.exam_result_med == "1") R.drawable.ic_green_medic else R.drawable.ic_red_telemedic
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if (notification.exam_state == "2") {
|
|
||||||
battery.setImageResource(R.drawable.ic_battery_full)
|
|
||||||
}
|
|
||||||
if (notification.exam_state == "1") {
|
|
||||||
battery.setImageResource(R.drawable.ic_battery_middle)
|
|
||||||
}
|
|
||||||
if (notification.exam_state == "0") {
|
|
||||||
battery.setImageResource(R.drawable.ic_battery_low)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,153 +2,55 @@ package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import com.arellomobile.mvp.presenter.InjectPresenter
|
import com.arellomobile.mvp.presenter.InjectPresenter
|
||||||
import com.arellomobile.mvp.presenter.ProvidePresenter
|
import com.arellomobile.mvp.presenter.ProvidePresenter
|
||||||
|
import kotlinx.android.synthetic.main.fragment_tasks.*
|
||||||
import ru.tele2med.mobile.R
|
import ru.tele2med.mobile.R
|
||||||
import ru.tele2med.mobile.domain.entity.DataCheckup
|
|
||||||
import ru.tele2med.mobile.presentation.ui.auth.AuthActivity
|
|
||||||
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
import ru.tele2med.mobile.presentation.ui.common.EndlessRecyclerViewScrollListener
|
|
||||||
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.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_hello.recyclerView
|
|
||||||
import kotlinx.android.synthetic.main.toolbar_with_help.*
|
|
||||||
import org.jetbrains.anko.clearTask
|
|
||||||
import org.jetbrains.anko.intentFor
|
|
||||||
import org.jetbrains.anko.newTask
|
|
||||||
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
|
||||||
|
|
||||||
|
|
||||||
class TechFragment : BaseMenuFragment(), CheckupsView {
|
class TechFragment : BaseMenuFragment(), TechView {
|
||||||
|
|
||||||
override val screenType: ScreenType
|
override val screenType: ScreenType
|
||||||
get() = ScreenType.HELLO
|
get() = ScreenType.TASKS_FOR_TODAY
|
||||||
|
|
||||||
@InjectPresenter
|
@InjectPresenter
|
||||||
lateinit var presenter: TechPresenter
|
lateinit var presenter: TechPresenter
|
||||||
|
|
||||||
private lateinit var layoutManager: LinearLayoutManager
|
|
||||||
|
|
||||||
|
|
||||||
@ProvidePresenter
|
@ProvidePresenter
|
||||||
fun initPresenter(): TechPresenter = providePresenter()
|
fun initPresenter(): TechPresenter = providePresenter()
|
||||||
|
|
||||||
override val layoutId: Int
|
override val layoutId: Int
|
||||||
get() = R.layout.fragment_tech_list
|
get() = R.layout.fragment_techs
|
||||||
|
|
||||||
|
override fun getPresenter(): BasePresenter<*> = presenter
|
||||||
|
|
||||||
private val adapter: TechAdapter by lazy {
|
|
||||||
TechAdapter { idcheckup ->
|
|
||||||
presenter.get(idcheckup)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
when (activity) {
|
|
||||||
is ReviewActivity -> {
|
|
||||||
(activity as ReviewActivity).apply {
|
|
||||||
help.visibility = View.VISIBLE
|
|
||||||
settings.visibility = View.VISIBLE
|
|
||||||
phone.visibility = View.VISIBLE
|
|
||||||
menu.setOnClickListener {
|
|
||||||
println("click menu is ReviewActivity -> {")
|
|
||||||
onBackPressed()
|
|
||||||
}
|
|
||||||
title = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is MenuActivity -> {
|
|
||||||
(activity as MenuActivity).apply {
|
(activity as MenuActivity).apply {
|
||||||
// addDrawerToggle()
|
addDrawerToggle()
|
||||||
help.visibility = View.VISIBLE
|
title = getString(R.string.tech_checkup)
|
||||||
settings.visibility = View.VISIBLE
|
|
||||||
phone.visibility = View.VISIBLE
|
|
||||||
menu.setOnClickListener {
|
|
||||||
println("click menu is MenuActivity -> {")
|
|
||||||
|
|
||||||
onBackPressed()
|
|
||||||
}
|
|
||||||
title = ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
initViewPager()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun initViewPager() {
|
||||||
|
context?.let {
|
||||||
|
|
||||||
presenter.getCheckups()
|
MyViewPager.adapter = TechAdapter(it, childFragmentManager)
|
||||||
|
|
||||||
layoutManager = LinearLayoutManager(context)
|
|
||||||
recyclerView.layoutManager = layoutManager
|
|
||||||
recyclerView.adapter = adapter
|
|
||||||
val scrollListener = object : EndlessRecyclerViewScrollListener(layoutManager) {
|
|
||||||
override fun onLoadMore() {
|
|
||||||
presenter.getCheckups()
|
|
||||||
}
|
}
|
||||||
}
|
tabLayout.setupWithViewPager(MyViewPager)
|
||||||
recyclerView.addOnScrollListener(scrollListener)
|
tabLayout.getTabAt(0)?.select()
|
||||||
|
tabLayout.getTabAt(0)?.setIcon(R.drawable.ic_search)
|
||||||
|
tabLayout.getTabAt(1)?.setIcon(R.drawable.ic_tasks_list)
|
||||||
//setName()
|
|
||||||
setClickListeners()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showCheckups(list: List<DataTechCheckup>) {
|
|
||||||
adapter.submitList(list)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun logOut() {
|
|
||||||
(activity as MenuActivity).apply {
|
|
||||||
startActivity(intentFor<AuthActivity>().newTask().clearTask())
|
|
||||||
stopUpdatesService()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setClickListeners() {
|
|
||||||
when (activity) {
|
|
||||||
is ReviewActivity -> {
|
|
||||||
(activity as ReviewActivity).apply {
|
|
||||||
help.visibility = View.VISIBLE
|
|
||||||
settings.visibility = View.VISIBLE
|
|
||||||
phone.visibility = View.VISIBLE
|
|
||||||
menu.setOnClickListener {
|
|
||||||
println("click menu setClickListeners1")
|
|
||||||
onOpenDrawer()
|
|
||||||
}
|
|
||||||
title = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is MenuActivity -> {
|
|
||||||
(activity as MenuActivity).apply {
|
|
||||||
help.visibility = View.VISIBLE
|
|
||||||
settings.visibility = View.VISIBLE
|
|
||||||
phone.visibility = View.VISIBLE
|
|
||||||
menu.setOnClickListener {
|
|
||||||
println("click menu setClickListeners2")
|
|
||||||
|
|
||||||
onOpenDrawer()
|
|
||||||
}
|
|
||||||
title = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setName() {
|
|
||||||
//tvName.text = prefs.getCurrentUserName()
|
|
||||||
//tvName2.text = prefs.getAppUniqId()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getPresenter(): BasePresenter<*>? = null
|
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -1,77 +1,7 @@
|
|||||||
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
||||||
|
|
||||||
import com.arellomobile.mvp.InjectViewState
|
import com.arellomobile.mvp.InjectViewState
|
||||||
import ru.tele2med.mobile.domain.entity.DataCheckup
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuPresenter
|
||||||
import ru.tele2med.mobile.domain.interactor.QRInteractor
|
|
||||||
import ru.tele2med.mobile.presentation.router.NavRouter
|
|
||||||
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
|
||||||
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
|
|
||||||
import ru.tele2med.mobile.presentation.ui.models.UiConverter
|
|
||||||
import ru.tele2med.mobile.presentation.util.ioToMain
|
|
||||||
import io.reactivex.rxkotlin.plusAssign
|
|
||||||
import ru.tele2med.mobile.data.api.entity.exception.ApiException
|
|
||||||
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
|
||||||
import ru.tele2med.mobile.domain.interactor.TechInteractor
|
|
||||||
|
|
||||||
@InjectViewState
|
@InjectViewState
|
||||||
class TechPresenter(
|
class TechPresenter : BaseMenuPresenter<TechView>()
|
||||||
private val techInteractor: TechInteractor,
|
|
||||||
private val uiConverter: UiConverter,
|
|
||||||
private val navRouter: NavRouter
|
|
||||||
|
|
||||||
) : BasePresenter<CheckupsView>() {
|
|
||||||
private val currentCheckups = mutableListOf<DataTechCheckup>() // новые в начале
|
|
||||||
|
|
||||||
|
|
||||||
fun get(idcheckup: String) {
|
|
||||||
println("TechPresenter")
|
|
||||||
disposable += techInteractor
|
|
||||||
.getQR(idcheckup)
|
|
||||||
.ioToMain()
|
|
||||||
.doOnSubscribe {
|
|
||||||
viewState.showLoading()
|
|
||||||
}
|
|
||||||
.doAfterTerminate {
|
|
||||||
viewState.hideLoading()
|
|
||||||
}
|
|
||||||
.subscribe({
|
|
||||||
|
|
||||||
navRouter.openMedicalCheckupScreen(it.data)
|
|
||||||
}, {
|
|
||||||
if (it is ApiException) {
|
|
||||||
if (it.code == RestApiCodes.BadRequest.code) {
|
|
||||||
viewState.showError("QR-код некорректный, повторите попытку, или используйте другой QR-код")
|
|
||||||
} else {
|
|
||||||
this.handleError(it)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
println("not it is com.")
|
|
||||||
this.handleError(it)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun getCheckups() {
|
|
||||||
disposable += techInteractor
|
|
||||||
.getTechCheckupList(
|
|
||||||
offset = currentCheckups.size,
|
|
||||||
limit = 10
|
|
||||||
)
|
|
||||||
.map(uiConverter::toUiTechCheckups)
|
|
||||||
.ioToMain()
|
|
||||||
.baseLoadingHandle()
|
|
||||||
.baseHandleErrorSubscribe {
|
|
||||||
currentCheckups.addAll(it.data)
|
|
||||||
viewState.showCheckups(currentCheckups.toList())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun onNeedForRootScreen() {
|
|
||||||
// navRouter.newRootScreen(NavScreens.getHelloScreen())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,13 +1,13 @@
|
|||||||
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import ru.tele2med.mobile.presentation.ui.menu.items.checkups.CheckupsFragment
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.TechListFragment
|
||||||
import ru.terrakok.cicerone.android.support.SupportAppScreen
|
import ru.terrakok.cicerone.android.support.SupportAppScreen
|
||||||
|
|
||||||
class TechScreen : SupportAppScreen() {
|
class TechScreen : SupportAppScreen() {
|
||||||
|
|
||||||
override fun getFragment(): Fragment {
|
override fun getFragment(): Fragment {
|
||||||
return CheckupsFragment.getInstance()
|
return TechFragment.getInstance()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getScreenKey(): String {
|
override fun getScreenKey(): String {
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
||||||
|
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
||||||
|
|
||||||
|
interface TechView : BaseView {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,92 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list
|
||||||
|
|
||||||
|
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.DataTechCheckup
|
||||||
|
|
||||||
|
class TechListAdapter(
|
||||||
|
val onItemClick: (checkupId: String) -> Unit
|
||||||
|
) : ListAdapter<DataTechCheckup, TechListAdapter.ViewHolder>(
|
||||||
|
DIFF_CALLBACK
|
||||||
|
) {
|
||||||
|
companion object {
|
||||||
|
private val DIFF_CALLBACK = object : DiffUtil.ItemCallback<DataTechCheckup>() {
|
||||||
|
override fun areItemsTheSame(p0: DataTechCheckup, p1: DataTechCheckup): Boolean =
|
||||||
|
p0.id == p1.id
|
||||||
|
|
||||||
|
override fun areContentsTheSame(p0: DataTechCheckup, p1: DataTechCheckup): Boolean =
|
||||||
|
p0 == p1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
val inflater = LayoutInflater.from(parent.context)
|
||||||
|
return ViewHolder(inflater.inflate(R.layout.item_tech, parent, false))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
|
holder.bind(getItem(position))
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||||
|
private val carName: TextView = view.findViewById(R.id.carName)
|
||||||
|
private val time: TextView = view.findViewById(R.id.tvTime)
|
||||||
|
private val fio: TextView = view.findViewById(R.id.tvFio)
|
||||||
|
private val eye: ImageView = view.findViewById(R.id.ivEye)
|
||||||
|
private val status: TextView = view.findViewById(R.id.tvStatus)
|
||||||
|
private val battery: ImageView = view.findViewById(R.id.ivBattery)
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
view.setOnClickListener {
|
||||||
|
val list = getItem(adapterPosition)
|
||||||
|
onItemClick(list.uniq_id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bind(list: DataTechCheckup) {
|
||||||
|
carName.text = list.vehicle_name
|
||||||
|
time.text = list.datetime
|
||||||
|
//fio.text = list.fio
|
||||||
|
status.text = list.exam_state_name
|
||||||
|
/* eye.setImageDrawable(
|
||||||
|
ContextCompat.getDrawable(
|
||||||
|
itemView.context,
|
||||||
|
if (list.recognize == "1") R.drawable.ic_green_eye else R.drawable.ic_red_eye
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
auto.setImageDrawable(
|
||||||
|
ContextCompat.getDrawable(
|
||||||
|
itemView.context,
|
||||||
|
if (list.exam_state == "1") R.drawable.ic_green_auto else R.drawable.ic_red_auto
|
||||||
|
)
|
||||||
|
)*/
|
||||||
|
|
||||||
|
/* medic.setImageDrawable(
|
||||||
|
ContextCompat.getDrawable(
|
||||||
|
itemView.context,
|
||||||
|
if (list.exam_result_med == "1") R.drawable.ic_green_medic else R.drawable.ic_red_telemedic
|
||||||
|
)
|
||||||
|
) */
|
||||||
|
|
||||||
|
if (list.exam_state == "4") {
|
||||||
|
battery.setImageResource(R.drawable.ic_battery_full)
|
||||||
|
}
|
||||||
|
if (list.exam_state == "3") {
|
||||||
|
battery.setImageResource(R.drawable.ic_battery_middle)
|
||||||
|
}
|
||||||
|
if (list.exam_state == "0" || list.exam_state == "1" || list.exam_state == "2") {
|
||||||
|
battery.setImageResource(R.drawable.ic_battery_low)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,156 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.arellomobile.mvp.presenter.InjectPresenter
|
||||||
|
import com.arellomobile.mvp.presenter.ProvidePresenter
|
||||||
|
import kotlinx.android.synthetic.main.fragment_tech_list.*
|
||||||
|
import ru.tele2med.mobile.R
|
||||||
|
import ru.tele2med.mobile.presentation.ui.auth.AuthActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.common.EndlessRecyclerViewScrollListener
|
||||||
|
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
|
||||||
|
import ru.tele2med.mobile.presentation.util.providePresenter
|
||||||
|
import kotlinx.android.synthetic.main.toolbar_with_help.*
|
||||||
|
import org.jetbrains.anko.clearTask
|
||||||
|
import org.jetbrains.anko.intentFor
|
||||||
|
import org.jetbrains.anko.newTask
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
||||||
|
|
||||||
|
|
||||||
|
class TechListFragment : BaseMenuFragment(), TechListView {
|
||||||
|
|
||||||
|
override val screenType: ScreenType
|
||||||
|
get() = ScreenType.HELLO
|
||||||
|
|
||||||
|
@InjectPresenter
|
||||||
|
lateinit var presenter: TechListPresenter
|
||||||
|
|
||||||
|
private lateinit var layoutManager: LinearLayoutManager
|
||||||
|
|
||||||
|
|
||||||
|
@ProvidePresenter
|
||||||
|
fun initPresenter(): TechListPresenter = providePresenter()
|
||||||
|
|
||||||
|
override val layoutId: Int
|
||||||
|
get() = R.layout.fragment_tech_list
|
||||||
|
|
||||||
|
|
||||||
|
private val adapter: TechListAdapter by lazy {
|
||||||
|
TechListAdapter { idcheckup ->
|
||||||
|
presenter.get(idcheckup)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
when (activity) {
|
||||||
|
is ReviewActivity -> {
|
||||||
|
(activity as ReviewActivity).apply {
|
||||||
|
help.visibility = View.VISIBLE
|
||||||
|
settings.visibility = View.VISIBLE
|
||||||
|
phone.visibility = View.VISIBLE
|
||||||
|
menu.setOnClickListener {
|
||||||
|
println("click menu is ReviewActivity -> {")
|
||||||
|
onBackPressed()
|
||||||
|
}
|
||||||
|
title = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is MenuActivity -> {
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
// addDrawerToggle()
|
||||||
|
help.visibility = View.VISIBLE
|
||||||
|
settings.visibility = View.VISIBLE
|
||||||
|
phone.visibility = View.VISIBLE
|
||||||
|
menu.setOnClickListener {
|
||||||
|
println("click menu is MenuActivity -> {")
|
||||||
|
|
||||||
|
onBackPressed()
|
||||||
|
}
|
||||||
|
title = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// presenter.getCheckups()
|
||||||
|
|
||||||
|
layoutManager = LinearLayoutManager(context)
|
||||||
|
recyclerView.layoutManager = layoutManager
|
||||||
|
recyclerView.adapter = adapter
|
||||||
|
val scrollListener = object : EndlessRecyclerViewScrollListener(layoutManager) {
|
||||||
|
override fun onLoadMore() {
|
||||||
|
presenter.getCheckups()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
recyclerView.addOnScrollListener(scrollListener)
|
||||||
|
|
||||||
|
|
||||||
|
//setName()
|
||||||
|
setClickListeners()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showCheckups(list: List<DataTechCheckup>) {
|
||||||
|
adapter.submitList(list)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun logOut() {
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
startActivity(intentFor<AuthActivity>().newTask().clearTask())
|
||||||
|
stopUpdatesService()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setClickListeners() {
|
||||||
|
when (activity) {
|
||||||
|
is ReviewActivity -> {
|
||||||
|
(activity as ReviewActivity).apply {
|
||||||
|
help.visibility = View.VISIBLE
|
||||||
|
settings.visibility = View.VISIBLE
|
||||||
|
phone.visibility = View.VISIBLE
|
||||||
|
menu.setOnClickListener {
|
||||||
|
println("click menu setClickListeners1")
|
||||||
|
onOpenDrawer()
|
||||||
|
}
|
||||||
|
title = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is MenuActivity -> {
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
help.visibility = View.VISIBLE
|
||||||
|
settings.visibility = View.VISIBLE
|
||||||
|
phone.visibility = View.VISIBLE
|
||||||
|
menu.setOnClickListener {
|
||||||
|
println("click menu setClickListeners2")
|
||||||
|
|
||||||
|
onOpenDrawer()
|
||||||
|
}
|
||||||
|
title = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setName() {
|
||||||
|
//tvName.text = prefs.getCurrentUserName()
|
||||||
|
//tvName2.text = prefs.getAppUniqId()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getPresenter(): BasePresenter<*>? = null
|
||||||
|
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun getInstance() = TechListFragment()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.InjectViewState
|
||||||
|
import ru.tele2med.mobile.presentation.router.NavRouter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
|
||||||
|
import ru.tele2med.mobile.presentation.ui.models.UiConverter
|
||||||
|
import ru.tele2med.mobile.presentation.util.ioToMain
|
||||||
|
import io.reactivex.rxkotlin.plusAssign
|
||||||
|
import ru.tele2med.mobile.data.api.entity.exception.ApiException
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
||||||
|
import ru.tele2med.mobile.domain.interactor.TechInteractor
|
||||||
|
|
||||||
|
@InjectViewState
|
||||||
|
class TechListPresenter(
|
||||||
|
private val techInteractor: TechInteractor,
|
||||||
|
private val uiConverter: UiConverter,
|
||||||
|
private val navRouter: NavRouter
|
||||||
|
|
||||||
|
) : BasePresenter<TechListView>() {
|
||||||
|
private val currentCheckups = mutableListOf<DataTechCheckup>() // новые в начале
|
||||||
|
|
||||||
|
|
||||||
|
override fun onFirstViewAttach() {
|
||||||
|
getCheckups()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun get(idcheckup: String) {
|
||||||
|
println("TechPresenter")
|
||||||
|
disposable += techInteractor
|
||||||
|
.getTech(idcheckup)
|
||||||
|
.ioToMain()
|
||||||
|
.doOnSubscribe {
|
||||||
|
viewState.showLoading()
|
||||||
|
}
|
||||||
|
.doAfterTerminate {
|
||||||
|
viewState.hideLoading()
|
||||||
|
}
|
||||||
|
.subscribe({
|
||||||
|
|
||||||
|
navRouter.openTechCheckupScreen(it.data)
|
||||||
|
}, {
|
||||||
|
if (it is ApiException) {
|
||||||
|
if (it.code == RestApiCodes.BadRequest.code) {
|
||||||
|
viewState.showError("Идентификатор некорректный, повторите попытку, или используйте другую запись")
|
||||||
|
} else {
|
||||||
|
this.handleError(it)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
println("not it is com.")
|
||||||
|
this.handleError(it)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun getCheckups() {
|
||||||
|
disposable += techInteractor
|
||||||
|
.getTechCheckupList(
|
||||||
|
offset = currentCheckups.size,
|
||||||
|
limit = 10
|
||||||
|
)
|
||||||
|
.map(uiConverter::toUiTechCheckups)
|
||||||
|
.ioToMain()
|
||||||
|
.baseLoadingHandle()
|
||||||
|
.baseHandleErrorSubscribe {
|
||||||
|
currentCheckups.addAll(it.data)
|
||||||
|
viewState.showCheckups(currentCheckups.toList())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun onNeedForRootScreen() {
|
||||||
|
// navRouter.newRootScreen(NavScreens.getHelloScreen())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
package ru.tele2med.mobile.presentation.ui.menu.items.tech
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list
|
||||||
|
|
||||||
import ru.tele2med.mobile.domain.entity.DataCheckup
|
import ru.tele2med.mobile.domain.entity.DataCheckup
|
||||||
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
import ru.tele2med.mobile.domain.entity.DataTechCheckup
|
||||||
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
||||||
|
|
||||||
|
|
||||||
interface CheckupsView : BaseView {
|
interface TechListView : BaseView {
|
||||||
fun showCheckups(list: List<DataTechCheckup>)
|
fun showCheckups(list: List<DataTechCheckup>)
|
||||||
}
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.fragment.app.FragmentManager
|
||||||
|
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||||
|
import ru.tele2med.mobile.R
|
||||||
|
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
|
||||||
|
|
||||||
|
class TechCheckupAdapter(val context: Context, fm: FragmentManager, private var dataTech: String?) : FragmentStatePagerAdapter(fm) {
|
||||||
|
|
||||||
|
private var fragments: MutableList<Fragment> = mutableListOf()
|
||||||
|
|
||||||
|
override fun getItem(position: Int): Fragment {
|
||||||
|
return when (position) {
|
||||||
|
0 -> {
|
||||||
|
val fragment = TechCheckupInfoFragment.getInstance(dataTech)
|
||||||
|
|
||||||
|
val arguments = Bundle()
|
||||||
|
fragment.arguments = arguments
|
||||||
|
fragments.add(fragment)
|
||||||
|
fragment
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
val fragment = TechCheckupTestsFragment.getInstance(dataTech)
|
||||||
|
val arguments = Bundle()
|
||||||
|
fragment.arguments = arguments
|
||||||
|
fragments.add(fragment)
|
||||||
|
fragment
|
||||||
|
}
|
||||||
|
else -> throw Exception(context.getString(R.string.unexpected_page))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getCount(): Int {
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getPageTitle(position: Int): CharSequence? {
|
||||||
|
val tabTitles = listOf(
|
||||||
|
context.getString(R.string.checkups_info_title),
|
||||||
|
context.getString(R.string.checkups_tests_title)
|
||||||
|
)
|
||||||
|
return when (position) {
|
||||||
|
0 -> tabTitles.first()
|
||||||
|
1 -> tabTitles.last()
|
||||||
|
else -> throw Exception(context.getString(R.string.unexpected_page))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import com.arellomobile.mvp.presenter.InjectPresenter
|
||||||
|
import com.arellomobile.mvp.presenter.ProvidePresenter
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import kotlinx.android.synthetic.main.fragment_tasks.*
|
||||||
|
import ru.tele2med.mobile.R
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
|
||||||
|
import ru.tele2med.mobile.presentation.util.providePresenter
|
||||||
|
|
||||||
|
|
||||||
|
class TechCheckupFragment : BaseMenuFragment(), TechCheckupView {
|
||||||
|
|
||||||
|
override val screenType: ScreenType
|
||||||
|
get() = ScreenType.TASKS_FOR_TODAY
|
||||||
|
|
||||||
|
@InjectPresenter
|
||||||
|
lateinit var presenter: TechCheckupPresenter
|
||||||
|
|
||||||
|
@ProvidePresenter
|
||||||
|
fun initPresenter(): TechCheckupPresenter =
|
||||||
|
providePresenter(arguments?.getString(DATA_QR) ?: "")
|
||||||
|
|
||||||
|
override val layoutId: Int
|
||||||
|
get() = R.layout.fragment_techs
|
||||||
|
|
||||||
|
override fun getPresenter(): BasePresenter<*> = presenter
|
||||||
|
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
var dataString = arguments?.getString(DATA_QR)
|
||||||
|
|
||||||
|
val gson = Gson()
|
||||||
|
val data = gson.fromJson(dataString, DataTech::class.java)
|
||||||
|
addDrawerToggle()
|
||||||
|
Log.v("TechCheckupFragment", "args = ${arguments?.getString(DATA_QR)}")
|
||||||
|
|
||||||
|
title = data.vehicle_name
|
||||||
|
}
|
||||||
|
initViewPager()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun initViewPager() {
|
||||||
|
context?.let {
|
||||||
|
|
||||||
|
|
||||||
|
MyViewPager.adapter = TechCheckupAdapter(
|
||||||
|
it, childFragmentManager, arguments?.getString(
|
||||||
|
DATA_QR
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
tabLayout.setupWithViewPager(MyViewPager)
|
||||||
|
tabLayout.getTabAt(0)?.select()
|
||||||
|
tabLayout.getTabAt(0)?.setIcon(R.drawable.ic_search)
|
||||||
|
tabLayout.getTabAt(1)?.setIcon(R.drawable.ic_tasks_list)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val DATA_QR = "DATA_QR"
|
||||||
|
|
||||||
|
fun getInstance(dataTech: DataTech): TechCheckupFragment {
|
||||||
|
val gson = Gson()
|
||||||
|
val string: String = gson.toJson(dataTech)
|
||||||
|
Log.v("TechCheckupFragment", "dataTech = $dataTech")
|
||||||
|
Log.v("TechCheckupFragment", "dataTechString = $string")
|
||||||
|
|
||||||
|
return TechCheckupFragment().also {
|
||||||
|
it.arguments = Bundle().apply {
|
||||||
|
putString(DATA_QR, string)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.InjectViewState
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuPresenter
|
||||||
|
|
||||||
|
@InjectViewState
|
||||||
|
class TechCheckupPresenter : BaseMenuPresenter<TechCheckupView>()
|
@ -0,0 +1,16 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
|
import ru.terrakok.cicerone.android.support.SupportAppScreen
|
||||||
|
|
||||||
|
class TechCheckupScreen(val dataTech: DataTech) : SupportAppScreen() {
|
||||||
|
|
||||||
|
override fun getFragment(): Fragment {
|
||||||
|
return TechCheckupFragment.getInstance(dataTech)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getScreenKey(): String {
|
||||||
|
return TechCheckupFragment::class.java.name
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup
|
||||||
|
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
||||||
|
|
||||||
|
interface TechCheckupView : BaseView {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,255 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.net.Uri
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.MediaController
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
|
import androidx.core.net.toUri
|
||||||
|
import com.arellomobile.mvp.presenter.InjectPresenter
|
||||||
|
import com.arellomobile.mvp.presenter.ProvidePresenter
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.squareup.picasso.Picasso
|
||||||
|
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.drawer.entity.ScreenType
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
|
||||||
|
import ru.tele2med.mobile.presentation.util.providePresenter
|
||||||
|
import kotlinx.android.synthetic.main.fragment_medical_checkup.*
|
||||||
|
import kotlinx.android.synthetic.main.toolbar_with_help.*
|
||||||
|
import ru.tele2med.mobile.BuildConfig
|
||||||
|
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.tech.list.techCheckup.tests.TechCheckupTestsFragment
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsPresenter
|
||||||
|
|
||||||
|
|
||||||
|
class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
|
||||||
|
|
||||||
|
override val screenType: ScreenType
|
||||||
|
get() = ScreenType.QR
|
||||||
|
|
||||||
|
@InjectPresenter
|
||||||
|
lateinit var presenter: TechCheckupInfoPresenter
|
||||||
|
|
||||||
|
|
||||||
|
@ProvidePresenter
|
||||||
|
fun initPresenter(): TechCheckupInfoPresenter =
|
||||||
|
providePresenter(arguments?.getString(DATA_QR) ?: "")
|
||||||
|
|
||||||
|
override val layoutId: Int
|
||||||
|
get() = R.layout.fragment_tech_checkup
|
||||||
|
|
||||||
|
private var root: View? = null // create a global variable which will hold your layout
|
||||||
|
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
when (activity) {
|
||||||
|
is ReviewActivity -> {
|
||||||
|
(activity as ReviewActivity).apply {
|
||||||
|
help.visibility = View.GONE
|
||||||
|
title = ""
|
||||||
|
// title = getString(R.string.help_toolbar)
|
||||||
|
// supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
// showOrHideHelpButton(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is MenuActivity -> {
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
// addDrawerToggle()
|
||||||
|
showOrHideHelpButton(false)
|
||||||
|
title = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tvDriverTitle.focusable
|
||||||
|
tvDriverTitle.requestFocus()
|
||||||
|
presenter.showCheckUp()
|
||||||
|
|
||||||
|
initRecycler()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setRefreshing(flag: Boolean) {
|
||||||
|
println("setRefreshing = $flag")
|
||||||
|
refresh.isRefreshing = flag
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initRecycler() {
|
||||||
|
println("initRecycler")
|
||||||
|
|
||||||
|
refresh.setOnRefreshListener {
|
||||||
|
println("setOnRefreshListener")
|
||||||
|
|
||||||
|
presenter.showCheckUp()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("StringFormatInvalid")
|
||||||
|
override fun fillData(dataTech: DataTech) {
|
||||||
|
|
||||||
|
println("СЕРВЕР = ${dataTech.mechanic_name}")
|
||||||
|
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 */
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun getPresenter(): BasePresenter<*>? = null
|
||||||
|
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
private const val DATA_QR = "DATA_QR"
|
||||||
|
fun getInstance(dataTech: String?): TechCheckupInfoFragment {
|
||||||
|
val gson = Gson()
|
||||||
|
Log.v("TechCheckupInfoFragment", "dataTech = $dataTech")
|
||||||
|
|
||||||
|
val string: String = gson.toJson(dataTech)
|
||||||
|
return TechCheckupInfoFragment().also {
|
||||||
|
it.arguments = Bundle().apply {
|
||||||
|
putString(TechCheckupInfoFragment.DATA_QR, dataTech)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private const val PERMISSION_CAMERA_REQUEST = 1
|
||||||
|
private const val RATIO_4_3_VALUE = 4.0 / 3.0
|
||||||
|
private const val RATIO_16_9_VALUE = 16.0 / 9.0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.InjectViewState
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
|
||||||
|
import ru.tele2med.mobile.presentation.util.Prefs
|
||||||
|
import ru.tele2med.mobile.presentation.util.ioToMain
|
||||||
|
import io.reactivex.rxkotlin.plusAssign
|
||||||
|
import ru.tele2med.mobile.data.api.entity.exception.ApiException
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
|
import ru.tele2med.mobile.domain.interactor.TechInteractor
|
||||||
|
|
||||||
|
@InjectViewState
|
||||||
|
class TechCheckupInfoPresenter(
|
||||||
|
private val techInteractor: TechInteractor,
|
||||||
|
private val prefs: Prefs,
|
||||||
|
private val stringId: String
|
||||||
|
) : BasePresenter<TechCheckupInfoView>() {
|
||||||
|
|
||||||
|
fun onRefresh() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showCheckUp() {
|
||||||
|
val gson = Gson()
|
||||||
|
val data = gson.fromJson(stringId, DataTech::class.java)
|
||||||
|
println("data RoleName = ${data}")
|
||||||
|
// viewState.fillData(data)
|
||||||
|
viewState.setRefreshing(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun get(code: String) {
|
||||||
|
println("qrcode4 $code")
|
||||||
|
|
||||||
|
disposable += techInteractor
|
||||||
|
.getTech(code)
|
||||||
|
.ioToMain()
|
||||||
|
.doOnSubscribe {
|
||||||
|
viewState.showLoading()
|
||||||
|
}
|
||||||
|
.doAfterTerminate {
|
||||||
|
viewState.hideLoading()
|
||||||
|
}
|
||||||
|
.subscribe({
|
||||||
|
|
||||||
|
|
||||||
|
}, {
|
||||||
|
if (it is ApiException) {
|
||||||
|
if (it.code == RestApiCodes.NotFound.code) {
|
||||||
|
} else {
|
||||||
|
this.handleError(it)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.handleError(it)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.viewstate.strategy.AddToEndSingleStrategy
|
||||||
|
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataQR
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
||||||
|
|
||||||
|
|
||||||
|
interface TechCheckupInfoView : BaseView {
|
||||||
|
fun fillData(dataTech: DataTech)
|
||||||
|
|
||||||
|
@StateStrategyType(AddToEndSingleStrategy::class)
|
||||||
|
fun setRefreshing(flag: Boolean)
|
||||||
|
}
|
@ -0,0 +1,269 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.net.Uri
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.MediaController
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
|
import androidx.core.net.toUri
|
||||||
|
import com.arellomobile.mvp.presenter.InjectPresenter
|
||||||
|
import com.arellomobile.mvp.presenter.ProvidePresenter
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.squareup.picasso.Picasso
|
||||||
|
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.drawer.entity.ScreenType
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.ReviewActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
|
||||||
|
import ru.tele2med.mobile.presentation.util.providePresenter
|
||||||
|
import kotlinx.android.synthetic.main.fragment_medical_checkup.*
|
||||||
|
import kotlinx.android.synthetic.main.toolbar_with_help.*
|
||||||
|
import ru.tele2med.mobile.BuildConfig
|
||||||
|
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 {
|
||||||
|
|
||||||
|
override val screenType: ScreenType
|
||||||
|
get() = ScreenType.QR
|
||||||
|
|
||||||
|
@InjectPresenter
|
||||||
|
lateinit var presenter: TechCheckupTestsPresenter
|
||||||
|
|
||||||
|
|
||||||
|
@ProvidePresenter
|
||||||
|
fun initPresenter(): TechCheckupTestsPresenter =
|
||||||
|
providePresenter(arguments?.getString(DATA_QR) ?: "")
|
||||||
|
|
||||||
|
|
||||||
|
override val layoutId: Int
|
||||||
|
get() = R.layout.fragment_tech_checkup
|
||||||
|
|
||||||
|
private var root: View? = null // create a global variable which will hold your layout
|
||||||
|
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
when (activity) {
|
||||||
|
is ReviewActivity -> {
|
||||||
|
(activity as ReviewActivity).apply {
|
||||||
|
help.visibility = View.GONE
|
||||||
|
title = ""
|
||||||
|
// title = getString(R.string.help_toolbar)
|
||||||
|
// supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
// showOrHideHelpButton(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is MenuActivity -> {
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
// addDrawerToggle()
|
||||||
|
showOrHideHelpButton(false)
|
||||||
|
title = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tvDriverTitle.focusable
|
||||||
|
tvDriverTitle.requestFocus()
|
||||||
|
presenter.showCheckUp()
|
||||||
|
|
||||||
|
initRecycler()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setRefreshing(flag: Boolean) {
|
||||||
|
println("setRefreshing = $flag")
|
||||||
|
refresh.isRefreshing = flag
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initRecycler() {
|
||||||
|
println("initRecycler")
|
||||||
|
|
||||||
|
refresh.setOnRefreshListener {
|
||||||
|
println("setOnRefreshListener")
|
||||||
|
|
||||||
|
presenter.showCheckUp()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@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
|
||||||
|
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
private const val DATA_QR = "DATA_QR"
|
||||||
|
fun getInstance(dataTech: String?): TechCheckupTestsFragment {
|
||||||
|
val gson = Gson()
|
||||||
|
Log.v("TechCheckupTestsFragment", "dataTech = $dataTech")
|
||||||
|
|
||||||
|
val string: String = gson.toJson(dataTech)
|
||||||
|
return TechCheckupTestsFragment().also {
|
||||||
|
it.arguments = Bundle().apply {
|
||||||
|
putString(DATA_QR, dataTech)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private const val PERMISSION_CAMERA_REQUEST = 1
|
||||||
|
private const val RATIO_4_3_VALUE = 4.0 / 3.0
|
||||||
|
private const val RATIO_16_9_VALUE = 16.0 / 9.0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.InjectViewState
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
|
||||||
|
import ru.tele2med.mobile.presentation.util.Prefs
|
||||||
|
import ru.tele2med.mobile.presentation.util.ioToMain
|
||||||
|
import io.reactivex.rxkotlin.plusAssign
|
||||||
|
import ru.tele2med.mobile.data.api.entity.exception.ApiException
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
|
import ru.tele2med.mobile.domain.interactor.TechInteractor
|
||||||
|
|
||||||
|
@InjectViewState
|
||||||
|
class TechCheckupTestsPresenter(
|
||||||
|
private val techInteractor: TechInteractor,
|
||||||
|
private val prefs: Prefs,
|
||||||
|
private val stringId: String
|
||||||
|
) : BasePresenter<TechCheckupTestsView>() {
|
||||||
|
|
||||||
|
fun onRefresh() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun showCheckUp() {
|
||||||
|
val gson = Gson()
|
||||||
|
val data = gson.fromJson(stringId, DataTech::class.java)
|
||||||
|
println("data stringId = ${stringId}")
|
||||||
|
// viewState.fillData(data)
|
||||||
|
viewState.setRefreshing(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun get(code: String) {
|
||||||
|
println("qrcode4 $code")
|
||||||
|
|
||||||
|
disposable += techInteractor
|
||||||
|
.getTech(code)
|
||||||
|
.ioToMain()
|
||||||
|
.doOnSubscribe {
|
||||||
|
viewState.showLoading()
|
||||||
|
}
|
||||||
|
.doAfterTerminate {
|
||||||
|
viewState.hideLoading()
|
||||||
|
}
|
||||||
|
.subscribe({
|
||||||
|
|
||||||
|
|
||||||
|
}, {
|
||||||
|
if (it is ApiException) {
|
||||||
|
if (it.code == RestApiCodes.NotFound.code) {
|
||||||
|
} else {
|
||||||
|
this.handleError(it)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.handleError(it)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.viewstate.strategy.AddToEndSingleStrategy
|
||||||
|
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataQR
|
||||||
|
import ru.tele2med.mobile.domain.entity.DataTech
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
||||||
|
|
||||||
|
|
||||||
|
interface TechCheckupTestsView : BaseView {
|
||||||
|
fun fillData(dataTech: DataTech)
|
||||||
|
|
||||||
|
@StateStrategyType(AddToEndSingleStrategy::class)
|
||||||
|
fun setRefreshing(flag: Boolean)
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.park
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.arellomobile.mvp.presenter.InjectPresenter
|
||||||
|
import com.arellomobile.mvp.presenter.ProvidePresenter
|
||||||
|
import ru.tele2med.mobile.R
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
|
||||||
|
import ru.tele2med.mobile.presentation.util.providePresenter
|
||||||
|
|
||||||
|
class ParkFragment : BaseMenuFragment(), ParkView {
|
||||||
|
|
||||||
|
override val screenType: ScreenType
|
||||||
|
get() = ScreenType.WITHOUT_BORDER
|
||||||
|
|
||||||
|
@InjectPresenter
|
||||||
|
lateinit var presenter: ParkPresenter
|
||||||
|
|
||||||
|
private var errorDialog: androidx.appcompat.app.AlertDialog? = null
|
||||||
|
|
||||||
|
|
||||||
|
@ProvidePresenter
|
||||||
|
fun initPresenter(): ParkPresenter = providePresenter()
|
||||||
|
|
||||||
|
override fun getPresenter(): BasePresenter<*>? = presenter
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
(activity as MenuActivity).apply {
|
||||||
|
addDrawerToggle()
|
||||||
|
title = getString(R.string.park_toolbar)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
override val layoutId: Int
|
||||||
|
get() = R.layout.fragment_park
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun getInstance() = ParkFragment()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.park
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.InjectViewState
|
||||||
|
import io.reactivex.rxkotlin.plusAssign
|
||||||
|
import ru.tele2med.mobile.domain.entity.Position
|
||||||
|
import ru.tele2med.mobile.domain.interactor.SosInteractor
|
||||||
|
import ru.tele2med.mobile.presentation.Changes
|
||||||
|
import ru.tele2med.mobile.presentation.router.NavRouter
|
||||||
|
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuPresenter
|
||||||
|
import ru.tele2med.mobile.presentation.util.ioToMain
|
||||||
|
|
||||||
|
|
||||||
|
@InjectViewState
|
||||||
|
class ParkPresenter(
|
||||||
|
private val sosInteractor: SosInteractor,
|
||||||
|
private val navRouter: NavRouter,
|
||||||
|
private val changes: Changes
|
||||||
|
) : BaseMenuPresenter<ParkView>() {
|
||||||
|
|
||||||
|
private var position: Position? = null
|
||||||
|
|
||||||
|
override fun onFirstViewAttach() {
|
||||||
|
super.onFirstViewAttach()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.park
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import ru.terrakok.cicerone.android.support.SupportAppScreen
|
||||||
|
|
||||||
|
class ParkScreen : SupportAppScreen() {
|
||||||
|
|
||||||
|
override fun getFragment(): Fragment {
|
||||||
|
return ParkFragment.getInstance()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getScreenKey(): String {
|
||||||
|
return ParkFragment::class.java.name
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package ru.tele2med.mobile.presentation.ui.menu.items.tech.park
|
||||||
|
|
||||||
|
import com.arellomobile.mvp.viewstate.strategy.SkipStrategy
|
||||||
|
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
|
||||||
|
import ru.tele2med.mobile.presentation.ui.base.BaseView
|
||||||
|
|
||||||
|
interface ParkView : BaseView {
|
||||||
|
|
||||||
|
}
|
14
app/src/main/res/layout/fragment_park.xml
Normal file
14
app/src/main/res/layout/fragment_park.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout 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.ui.menu.items.tech.park.ParkFragment">
|
||||||
|
|
||||||
|
<!-- TODO: Update blank fragment layout -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="@string/hello_blank_fragment" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
617
app/src/main/res/layout/fragment_tech.xml
Normal file
617
app/src/main/res/layout/fragment_tech.xml
Normal file
@ -0,0 +1,617 @@
|
|||||||
|
<?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:id="@+id/parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:id="@+id/scrollView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clMainContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvMainInfoTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:text="@string/task_main_info_title"
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cvMainInfoContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
app:cardCornerRadius="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvMainInfoTitle">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/background_sos_et"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatusTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/task_status_title"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivStatusIcon"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tvStatusDescription"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvStatusTitle"
|
||||||
|
tools:src="@drawable/ic_task_status_accpeted" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatusDescription"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvStatusTitle"
|
||||||
|
tools:text="Выполнено"
|
||||||
|
tools:textColor="@color/status_accepted" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:background="@color/divider_color"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvStatusDescription" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCommentTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/task_comment_title"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCommentDescription"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:gravity="end"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCommentTitle"
|
||||||
|
tools:text="В работе с выффффффффффффффффффффффффффффффголовой" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider_2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:background="@color/divider_color"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCommentDescription" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvArrivalTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/task_arrival_title"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider_2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvArrivalDescription"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvArrivalTitle"
|
||||||
|
tools:text="14:00 12.11.2019" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider_3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:background="@color/divider_color"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvArrivalDescription" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPassengerTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/task_passenger_title"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider_3" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPassengerName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textAlignment="textEnd"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvPassengerTitle"
|
||||||
|
tools:text="Петр Петр Петр НиколаевичНиколаевичНиколаевич" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clPhoneContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvPassengerName">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivPhone"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_phone_gray_24_dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPhone"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="18dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:textColor="@color/task_call_to_passenger"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/ivPhone"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="+7 999 987-65-43" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider_4"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@color/divider_color"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/clPhoneContainer" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvNoteTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/task_note_title"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider_4" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvNoteDescription"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="9dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvNoteTitle"
|
||||||
|
tools:text="Рядом с кафе “Ромашка”" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clRouteContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cvMainInfoContainer">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvRouteInfoTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginBottom="14dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:text="@string/task_route_title"
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clCollapseContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCollapseText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="9dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
android:textSize="15sp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/ivCollapseIcon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivCollapseIcon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_collapse"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
app:cardCornerRadius="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvRouteInfoTitle">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/background_sos_et"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvRouteInfoTitle">
|
||||||
|
|
||||||
|
<net.cachapa.expandablelayout.ExpandableLayout
|
||||||
|
android:id="@+id/expandableLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:el_duration="1000"
|
||||||
|
app:el_expanded="true"
|
||||||
|
app:el_parallax="0.5">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llRouteContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical" />
|
||||||
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clPlannedContainer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:background="@drawable/background_planned_container"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/clRouteContainer">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPlannedDistance"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="49dp"
|
||||||
|
android:layout_marginTop="11dp"
|
||||||
|
android:layout_marginEnd="49dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:fontFamily="@font/roboto_regular"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="28sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/center"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="≈ 500 км" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/center"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:background="@color/vertical_divider_color"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvPlannedTime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="33dp"
|
||||||
|
android:layout_marginTop="11dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:fontFamily="@font/roboto_regular"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="28sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/center"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="≈ 16 мин" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDataCaptureTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:text="@string/task_data_capture_title"
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/clPlannedContainer" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cvDataCaptureContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
app:cardCornerRadius="5dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvDataCaptureTitle">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llDataCaptureContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/background_sos_et"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="14dp" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clLastBlockContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cvDataCaptureContainer">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatsTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:text="@string/task_stats_title"
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cvStatsContainer"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
app:cardCornerRadius="5dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvStatsTitle">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llStatsContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/background_sos_et"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatsTrackTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/distance"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatsTrackDescription"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="5,2 km" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:background="@color/divider_color"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvStatsTrackTitle" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatsTimeTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:text="@string/time"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatsTimeDescription"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="14dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:paddingBottom="14dp"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="17 min" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.tisonline.tis_taxi.presentation.util.custom_view.CustomMapView
|
||||||
|
android:id="@+id/mapTask"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="500dp"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cvStatsContainer"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTrackTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:text="@string/task_track_title"
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cvStatsContainer" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clButtonsContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnCancel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:fontFamily="@font/roboto_light"
|
||||||
|
android:paddingTop="18dp"
|
||||||
|
android:paddingBottom="18dp"
|
||||||
|
android:text="@string/cancel_task"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
|
||||||
|
android:textColor="@color/transparent_white"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/btnAction" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnAction"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/tab_background_selected"
|
||||||
|
android:fontFamily="@font/roboto_medium"
|
||||||
|
android:paddingTop="19dp"
|
||||||
|
android:paddingBottom="17dp"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/semi_black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
tools:text="Начать поездку" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/fmContent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
786
app/src/main/res/layout/fragment_tech_checkup.xml
Normal file
786
app/src/main/res/layout/fragment_tech_checkup.xml
Normal file
@ -0,0 +1,786 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:id="@+id/scrollView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/clMainContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="40dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/checkupsHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView5"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:src="@drawable/ic_folder0_1"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="24dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:fontFamily="@font/roboto_regular"
|
||||||
|
android:text="@string/checkup"
|
||||||
|
android:textColor="#515151"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/imageView5"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:layout_editor_absoluteY="0dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/checkupsBody"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:background="@drawable/round"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/checkupsHeader">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/cvMainInfoContainer"
|
||||||
|
style="@style/BlockStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/checkupsBody">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvMainInfoTitle"
|
||||||
|
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="@string/block_title_main_info"
|
||||||
|
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
|
||||||
|
android:id="@+id/tvDriverNumberTitle"
|
||||||
|
style="@style/BlockValueTitleStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/driver_number_title"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvDriverTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDriverNumber"
|
||||||
|
style="@style/BlockValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvDriverNumberTitle"
|
||||||
|
tools:text="12353" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider"
|
||||||
|
style="@style/BlockValueDividerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvDriverNumber" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvSexTitle"
|
||||||
|
style="@style/BlockValueTitleStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/driver_sex_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/divider" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvSex"
|
||||||
|
style="@style/BlockValueStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvSexTitle"
|
||||||
|
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
|
||||||
|
android:id="@+id/divider3"
|
||||||
|
style="@style/BlockValueDividerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvSex" />
|
||||||
|
|
||||||
|
<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
|
||||||
|
android:id="@+id/tvOrgNameTitle"
|
||||||
|
style="@style/BlockValueTitleStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/driver_org_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/divider7" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvOrgName"
|
||||||
|
style="@style/BlockValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvOrgNameTitle"
|
||||||
|
tools:text="ООО Перевозчик" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider8"
|
||||||
|
style="@style/BlockValueDividerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvOrgName" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCheckupDataTitle"
|
||||||
|
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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/checkup_date_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvCheckupDataTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCheckupDate"
|
||||||
|
style="@style/BlockValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCheckupDateTitle"
|
||||||
|
tools:text="24.01.2021" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider9"
|
||||||
|
style="@style/SubblockValueDividerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCheckupDate" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCheckupBeginTimeTitle"
|
||||||
|
style="@style/BlockValueTitleStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/checkup_begin_time_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/divider9" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCheckupBeginTime"
|
||||||
|
style="@style/BlockValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCheckupBeginTimeTitle"
|
||||||
|
tools:text="11:32:34" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider10"
|
||||||
|
style="@style/BlockValueDividerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCheckupBeginTime" />
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -1,58 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/checkupsHeader"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView5"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="24dp"
|
|
||||||
android:src="@drawable/ic_folder0_1"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="24dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:fontFamily="@font/roboto_regular"
|
|
||||||
android:text="@string/last_checkups"
|
|
||||||
android:textColor="#515151"
|
|
||||||
android:textSize="18sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView5"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/checkupsBody"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:background="@drawable/round"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/checkupsHeader">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView"
|
android:id="@+id/recyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -63,7 +18,5 @@
|
|||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
tools:listitem="@layout/item_checkup" />
|
tools:listitem="@layout/item_checkup" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
27
app/src/main/res/layout/fragment_techs.xml
Normal file
27
app/src/main/res/layout/fragment_techs.xml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ru.tele2med.mobile.presentation.util.custom_view.MyViewPager
|
||||||
|
android:id="@+id/MyViewPager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tabLayout"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/tabLayout"
|
||||||
|
style="@style/MyCustomTabLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:tabBackground="@drawable/tab_color_selector"
|
||||||
|
app:tabGravity="fill"
|
||||||
|
app:tabInlineLabel="true"
|
||||||
|
app:tabMode="fixed" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
96
app/src/main/res/layout/item_tech.xml
Normal file
96
app/src/main/res/layout/item_tech.xml
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<?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/tvStatus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="Создан" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivEye"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/tvStatus"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:src="@drawable/ic_green_eye" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBattery"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvFio"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvFio"
|
||||||
|
tools:src="@drawable/ic_battery_low" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/carName"
|
||||||
|
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="Х727ХХ716 (Aurus)" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivClock"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_clock"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvTime"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvTime" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:fontFamily="@font/roboto_regular"
|
||||||
|
android:textColor="@color/gray_checkups"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivClock"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/carName"
|
||||||
|
tools:text="26.01.2022 06.31.34" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvFio"
|
||||||
|
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"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/carName"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvTime"
|
||||||
|
tools:text="Иванов Иван Иоанович" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -481,4 +481,6 @@
|
|||||||
|
|
||||||
<!--Mechanic-->
|
<!--Mechanic-->
|
||||||
<string name="mechanic">Технический осмотр автомобиля</string>
|
<string name="mechanic">Технический осмотр автомобиля</string>
|
||||||
|
<!-- TODO: Remove or change this placeholder text -->
|
||||||
|
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
105
build.gradle
Normal file
105
build.gradle
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
ext {
|
||||||
|
kotlin_version = '1.6.0'
|
||||||
|
gradle_version = '4.1.1'
|
||||||
|
google_services_version = '4.3.3'
|
||||||
|
fabric_gradle_version = '1.31.2'
|
||||||
|
|
||||||
|
// Android
|
||||||
|
multidex_version = '2.0.1'
|
||||||
|
appcompat_version = '1.1.0'
|
||||||
|
ktx_version = '1.2.0'
|
||||||
|
constraint_version = '1.1.3'
|
||||||
|
|
||||||
|
// Google
|
||||||
|
material_version = '1.0.0'
|
||||||
|
crashlytics_version = '2.10.1'
|
||||||
|
play_services_location_version = '17.0.0'
|
||||||
|
|
||||||
|
// Db
|
||||||
|
// Room
|
||||||
|
room_version = '2.2.5'
|
||||||
|
|
||||||
|
// Di
|
||||||
|
kodein_version = '6.5.0'
|
||||||
|
|
||||||
|
// Moxy
|
||||||
|
moxy_version = '1.7.0'
|
||||||
|
|
||||||
|
// Rx
|
||||||
|
rx_kotlin_version = '2.3.0'
|
||||||
|
rx_android_version = '2.1.1'
|
||||||
|
rx_java_version = '2.2.6'
|
||||||
|
rx_relay_version = '2.1.0'
|
||||||
|
|
||||||
|
// OkHttp
|
||||||
|
okhttp_version = '3.12.1'
|
||||||
|
|
||||||
|
// Retrofit
|
||||||
|
retrofit_version = '2.5.0'
|
||||||
|
|
||||||
|
// Picasso
|
||||||
|
picasso_version = '2.71828'
|
||||||
|
picasso_transf_version = '2.2.1'
|
||||||
|
|
||||||
|
// Cicerone
|
||||||
|
cicerone_version = '5.0.0'
|
||||||
|
|
||||||
|
// Ui
|
||||||
|
santalu_mask_et_version = '1.1.1'
|
||||||
|
poovam_pin_et_version = '1.2.1'
|
||||||
|
cachapa_explayout_version = '2.9.2'
|
||||||
|
|
||||||
|
// Yandex maps
|
||||||
|
yandex_maps_version = '3.4.0'
|
||||||
|
|
||||||
|
// Anko
|
||||||
|
anko_version = '0.10.8'
|
||||||
|
|
||||||
|
// Debug
|
||||||
|
timber_version = '4.7.1'
|
||||||
|
debugdrawer_version = '0.8.0'
|
||||||
|
chuck_version = '1.1.0'
|
||||||
|
lynx_version = '1.1.0'
|
||||||
|
|
||||||
|
// Tests
|
||||||
|
mockk_version = '1.9.3'
|
||||||
|
junit_version = '5.3.1'
|
||||||
|
junit_ext_version = '1.1.1'
|
||||||
|
espresso_version = '3.2.0'
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url 'https://maven.fabric.io/public'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath "com.android.tools.build:gradle:$gradle_version"
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
|
||||||
|
classpath "io.fabric.tools:gradle:$fabric_gradle_version"
|
||||||
|
classpath "com.google.gms:google-services:$google_services_version"
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url 'https://jitpack.io'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task clean(type: Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
6
conf.ini
Normal file
6
conf.ini
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
3.0
|
||||||
|
Мобайл Теле2Мед
|
||||||
|
mobile_tele2med
|
||||||
|
02.08.2023 10:00:00
|
||||||
|
010323_0800
|
||||||
|
image from qr dont rotate
|
23
gradle.properties
Normal file
23
gradle.properties
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app's APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
# Automatically convert third-party libraries to use AndroidX
|
||||||
|
android.enableJetifier=true
|
||||||
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
|
kotlin.code.style=official
|
||||||
|
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#Mon Oct 26 10:31:11 MSK 2020
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
172
gradlew
vendored
Normal file
172
gradlew
vendored
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=$(save "$@")
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
84
gradlew.bat
vendored
Normal file
84
gradlew.bat
vendored
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
BIN
keystore.jks
Normal file
BIN
keystore.jks
Normal file
Binary file not shown.
BIN
keystore_tele2med.jks
Normal file
BIN
keystore_tele2med.jks
Normal file
Binary file not shown.
8
lib/AndroidManifest.xml
Normal file
8
lib/AndroidManifest.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.mapwithme.maps.api"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<application />
|
||||||
|
|
||||||
|
</manifest>
|
19
lib/build.gradle
Normal file
19
lib/build.gradle
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
apply plugin: 'android-library'
|
||||||
|
|
||||||
|
android {
|
||||||
|
|
||||||
|
// Define these properties in the gradle.properties file in the root project folder
|
||||||
|
compileSdkVersion 33
|
||||||
|
buildToolsVersion "29.0.3"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 26
|
||||||
|
targetSdkVersion 33
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets.main {
|
||||||
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
java.srcDirs = ['src']
|
||||||
|
res.srcDirs = ['res']
|
||||||
|
}
|
||||||
|
}
|
92
lib/build.xml
Normal file
92
lib/build.xml
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="MwmApi" default="help">
|
||||||
|
|
||||||
|
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||||
|
It contains the path to the SDK. It should *NOT* be checked into
|
||||||
|
Version Control Systems. -->
|
||||||
|
<property file="local.properties" />
|
||||||
|
|
||||||
|
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||||
|
'android' tool to add properties to it.
|
||||||
|
This is the place to change some Ant specific build properties.
|
||||||
|
Here are some properties you may want to change/update:
|
||||||
|
|
||||||
|
source.dir
|
||||||
|
The name of the source directory. Default is 'src'.
|
||||||
|
out.dir
|
||||||
|
The name of the output directory. Default is 'bin'.
|
||||||
|
|
||||||
|
For other overridable properties, look at the beginning of the rules
|
||||||
|
files in the SDK, at tools/ant/build.xml
|
||||||
|
|
||||||
|
Properties related to the SDK location or the project target should
|
||||||
|
be updated using the 'android' tool with the 'update' action.
|
||||||
|
|
||||||
|
This file is an integral part of the build system for your
|
||||||
|
application and should be checked into Version Control Systems.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<property file="ant.properties" />
|
||||||
|
|
||||||
|
<!-- if sdk.dir was not set from one of the property file, then
|
||||||
|
get it from the ANDROID_HOME env var.
|
||||||
|
This must be done before we load project.properties since
|
||||||
|
the proguard config can use sdk.dir -->
|
||||||
|
<property environment="env" />
|
||||||
|
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
|
||||||
|
<isset property="env.ANDROID_HOME" />
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<!-- The project.properties file is created and updated by the 'android'
|
||||||
|
tool, as well as ADT.
|
||||||
|
|
||||||
|
This contains project specific properties such as project target, and library
|
||||||
|
dependencies. Lower level build properties are stored in ant.properties
|
||||||
|
(or in .classpath for Eclipse projects).
|
||||||
|
|
||||||
|
This file is an integral part of the build system for your
|
||||||
|
application and should be checked into Version Control Systems. -->
|
||||||
|
<loadproperties srcFile="project.properties" />
|
||||||
|
|
||||||
|
<!-- quick check on sdk.dir -->
|
||||||
|
<fail
|
||||||
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
|
||||||
|
unless="sdk.dir"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Import per project custom build rules if present at the root of the project.
|
||||||
|
This is the place to put custom intermediary targets such as:
|
||||||
|
-pre-build
|
||||||
|
-pre-compile
|
||||||
|
-post-compile (This is typically used for code obfuscation.
|
||||||
|
Compiled code location: ${out.classes.absolute.dir}
|
||||||
|
If this is not done in place, override ${out.dex.input.absolute.dir})
|
||||||
|
-post-package
|
||||||
|
-post-build
|
||||||
|
-pre-clean
|
||||||
|
-->
|
||||||
|
<import file="custom_rules.xml" optional="true" />
|
||||||
|
|
||||||
|
<!-- Import the actual build file.
|
||||||
|
|
||||||
|
To customize existing targets, there are two options:
|
||||||
|
- Customize only one target:
|
||||||
|
- copy/paste the target into this file, *before* the
|
||||||
|
<import> task.
|
||||||
|
- customize it to your needs.
|
||||||
|
- Customize the whole content of build.xml
|
||||||
|
- copy/paste the content of the rules files (minus the top node)
|
||||||
|
into this file, replacing the <import> task.
|
||||||
|
- customize to your needs.
|
||||||
|
|
||||||
|
***********************
|
||||||
|
****** IMPORTANT ******
|
||||||
|
***********************
|
||||||
|
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||||
|
in order to avoid having your file be overridden by tools such as "android update project"
|
||||||
|
-->
|
||||||
|
<!-- version-tag: 1 -->
|
||||||
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Automatically generated file. DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
package com.mapwithme.maps.api;
|
||||||
|
|
||||||
|
public final class BuildConfig {
|
||||||
|
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
||||||
|
public static final String LIBRARY_PACKAGE_NAME = "com.mapwithme.maps.api";
|
||||||
|
public static final String BUILD_TYPE = "debug";
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.mapwithme.maps.api"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="26"
|
||||||
|
android:targetSdkVersion="33" />
|
||||||
|
|
||||||
|
<application />
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.mapwithme.maps.api",
|
||||||
|
"variantName": "debug",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"outputFile": "AndroidManifest.xml"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
BIN
lib/build/intermediates/aar_main_jar/debug/classes.jar
Normal file
BIN
lib/build/intermediates/aar_main_jar/debug/classes.jar
Normal file
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
aarFormatVersion=1.0
|
||||||
|
aarMetadataVersion=1.0
|
@ -0,0 +1 @@
|
|||||||
|
{}
|
BIN
lib/build/intermediates/compile_r_class_jar/debug/R.jar
Normal file
BIN
lib/build/intermediates/compile_r_class_jar/debug/R.jar
Normal file
Binary file not shown.
18
lib/build/intermediates/compile_symbol_list/debug/R.txt
Normal file
18
lib/build/intermediates/compile_symbol_list/debug/R.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
int drawable background_pattern 0x0
|
||||||
|
int drawable btn_back_gray 0x0
|
||||||
|
int drawable btn_back_gray_active 0x0
|
||||||
|
int drawable btn_back_green 0x0
|
||||||
|
int drawable btn_back_green_active 0x0
|
||||||
|
int drawable btn_gray_selector 0x0
|
||||||
|
int drawable btn_green_selector 0x0
|
||||||
|
int drawable gray 0x0
|
||||||
|
int drawable green 0x0
|
||||||
|
int drawable overflow 0x0
|
||||||
|
int drawable pattern 0x0
|
||||||
|
int drawable shadow 0x0
|
||||||
|
int id btn_pro 0x0
|
||||||
|
int layout dlg_install_mwm 0x0
|
||||||
|
int string down_pro 0x0
|
||||||
|
int string mwm_should_be_installed 0x0
|
||||||
|
int string url_pro 0x0
|
||||||
|
int style promoButton 0x0
|
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\main\jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\debug\jniLibs"/></dataSet></merger>
|
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\main\shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\debug\shaders"/></dataSet></merger>
|
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\main\assets"/><source path="F:\24marchD\android\mobile_tele2med_2024\lib\build\intermediates\shader_assets\debug\out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\debug\assets"/></dataSet></merger>
|
@ -0,0 +1,14 @@
|
|||||||
|
#Tue Apr 09 14:49:42 MSK 2024
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\overflow.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\overflow.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\btn_green_selector.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\btn_green_selector.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\btn_gray_selector.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\btn_gray_selector.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\green.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\green.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\btn_back_gray_active.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\btn_back_gray_active.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\layout\\dlg_install_mwm.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\layout\\dlg_install_mwm.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\pattern.png=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\pattern.png
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\gray.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\gray.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\btn_back_green_active.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\btn_back_green_active.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\background_pattern.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\background_pattern.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\shadow.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\shadow.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\btn_back_gray.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\btn_back_gray.xml
|
||||||
|
F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\res\\drawable\\btn_back_green.xml=F\:\\24marchD\\android\\mobile_tele2med_2024\\lib\\build\\intermediates\\packaged_res\\debug\\drawable\\btn_back_green.xml
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="down_pro">Download MAPS.ME</string>
|
||||||
|
<string name="mwm_should_be_installed">Offline maps are required to proceed. We have partnered with MAPS.ME to provide you with offline maps of the entire world.\nTo continue please download the app:</string>
|
||||||
|
<string name="url_pro">http://maps.me/get</string>
|
||||||
|
<style name="promoButton" parent="android:Widget.Button">
|
||||||
|
<item name="android:layout_marginBottom">10dp</item>
|
||||||
|
<item name="android:layout_marginTop">10dp</item>
|
||||||
|
<item name="android:padding">6dp</item>
|
||||||
|
<item name="android:textColor">@android:color/white</item>
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\res"/><source path="F:\24marchD\android\mobile_tele2med_2024\lib\build\generated\res\rs\debug"/><source path="F:\24marchD\android\mobile_tele2med_2024\lib\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\res"><file name="background_pattern" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\background_pattern.xml" qualifiers="" type="drawable"/><file name="btn_back_gray" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\btn_back_gray.xml" qualifiers="" type="drawable"/><file name="btn_back_gray_active" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\btn_back_gray_active.xml" qualifiers="" type="drawable"/><file name="btn_back_green" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\btn_back_green.xml" qualifiers="" type="drawable"/><file name="btn_back_green_active" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\btn_back_green_active.xml" qualifiers="" type="drawable"/><file name="btn_gray_selector" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\btn_gray_selector.xml" qualifiers="" type="drawable"/><file name="btn_green_selector" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\btn_green_selector.xml" qualifiers="" type="drawable"/><file name="gray" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\gray.xml" qualifiers="" type="drawable"/><file name="green" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\green.xml" qualifiers="" type="drawable"/><file name="overflow" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\overflow.xml" qualifiers="" type="drawable"/><file name="pattern" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\pattern.png" qualifiers="" type="drawable"/><file name="shadow" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\drawable\shadow.xml" qualifiers="" type="drawable"/><file name="dlg_install_mwm" path="F:\24marchD\android\mobile_tele2med_2024\lib\res\layout\dlg_install_mwm.xml" qualifiers="" type="layout"/><file path="F:\24marchD\android\mobile_tele2med_2024\lib\res\values\strings.xml" qualifiers=""><string name="mwm_should_be_installed">Offline maps are required to proceed. We have partnered with MAPS.ME to provide you with offline maps of the entire world.\nTo continue please download the app:</string><string name="down_pro">Download MAPS.ME</string><string name="url_pro">http://maps.me/get</string></file><file path="F:\24marchD\android\mobile_tele2med_2024\lib\res\values\styles.xml" qualifiers=""><style name="promoButton" parent="android:Widget.Button">
|
||||||
|
<item name="android:layout_marginBottom">10dp</item>
|
||||||
|
<item name="android:layout_marginTop">10dp</item>
|
||||||
|
<item name="android:padding">6dp</item>
|
||||||
|
<item name="android:textColor">@android:color/white</item>
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
</style></file></source><source path="F:\24marchD\android\mobile_tele2med_2024\lib\build\generated\res\rs\debug"/><source path="F:\24marchD\android\mobile_tele2med_2024\lib\build\generated\res\resValues\debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\debug\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\24marchD\android\mobile_tele2med_2024\lib\src\debug\res"/></dataSet><mergedItems/></merger>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.mapwithme.maps.api"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="26"
|
||||||
|
android:targetSdkVersion="33" />
|
||||||
|
|
||||||
|
<application />
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,20 @@
|
|||||||
|
R_DEF: Internal format may change without notice
|
||||||
|
local
|
||||||
|
drawable background_pattern
|
||||||
|
drawable btn_back_gray
|
||||||
|
drawable btn_back_gray_active
|
||||||
|
drawable btn_back_green
|
||||||
|
drawable btn_back_green_active
|
||||||
|
drawable btn_gray_selector
|
||||||
|
drawable btn_green_selector
|
||||||
|
drawable gray
|
||||||
|
drawable green
|
||||||
|
drawable overflow
|
||||||
|
drawable pattern
|
||||||
|
drawable shadow
|
||||||
|
id btn_pro
|
||||||
|
layout dlg_install_mwm
|
||||||
|
string down_pro
|
||||||
|
string mwm_should_be_installed
|
||||||
|
string url_pro
|
||||||
|
style promoButton
|
@ -0,0 +1,16 @@
|
|||||||
|
1<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
3 package="com.mapwithme.maps.api"
|
||||||
|
4 android:versionCode="1"
|
||||||
|
5 android:versionName="1.0" >
|
||||||
|
6
|
||||||
|
7 <uses-sdk
|
||||||
|
8 android:minSdkVersion="26"
|
||||||
|
8-->F:\24marchD\android\mobile_tele2med_2024\lib\AndroidManifest.xml
|
||||||
|
9 android:targetSdkVersion="33" />
|
||||||
|
9-->F:\24marchD\android\mobile_tele2med_2024\lib\AndroidManifest.xml
|
||||||
|
10
|
||||||
|
11 <application />
|
||||||
|
11-->F:\24marchD\android\mobile_tele2med_2024\lib\AndroidManifest.xml:6:5-20
|
||||||
|
12
|
||||||
|
13</manifest>
|
BIN
lib/build/intermediates/merged_java_res/debug/out.jar
Normal file
BIN
lib/build/intermediates/merged_java_res/debug/out.jar
Normal file
Binary file not shown.
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "PACKAGED_MANIFESTS",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.mapwithme.maps.api",
|
||||||
|
"variantName": "debug",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"outputFile": "../../library_manifest/debug/AndroidManifest.xml"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:dither="true"
|
||||||
|
android:src="@drawable/pattern"
|
||||||
|
android:tileMode="repeat" />
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<!-- "background shadow" -->
|
||||||
|
<item android:drawable="@drawable/shadow"/>
|
||||||
|
<item
|
||||||
|
android:bottom="1dp"
|
||||||
|
android:left="1dp"
|
||||||
|
android:right="1dp"
|
||||||
|
android:top="1dp"
|
||||||
|
android:drawable="@drawable/gray"/>
|
||||||
|
|
||||||
|
</layer-list>
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<!-- "background shadow" -->
|
||||||
|
<item android:drawable="@drawable/shadow"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:bottom="2dp"
|
||||||
|
android:left="1dp"
|
||||||
|
android:right="1dp"
|
||||||
|
android:top="1dp"
|
||||||
|
android:drawable="@drawable/gray"/>
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/overflow"/>
|
||||||
|
|
||||||
|
</layer-list>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<!-- "background shadow" -->
|
||||||
|
<item android:drawable="@drawable/shadow"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:bottom="1dp"
|
||||||
|
android:left="1dp"
|
||||||
|
android:right="1dp"
|
||||||
|
android:top="1dp"
|
||||||
|
android:drawable="@drawable/green"/>
|
||||||
|
|
||||||
|
</layer-list>
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<!-- "background shadow" -->
|
||||||
|
<item android:drawable="@drawable/shadow"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:bottom="2dp"
|
||||||
|
android:left="1dp"
|
||||||
|
android:right="1dp"
|
||||||
|
android:top="1dp"
|
||||||
|
android:drawable="@drawable/green"/>
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/overflow"/>
|
||||||
|
|
||||||
|
</layer-list>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/btn_back_gray_active" android:state_pressed="true"/>
|
||||||
|
<item android:drawable="@drawable/btn_back_gray"/>
|
||||||
|
|
||||||
|
</selector>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/btn_back_green_active" android:state_pressed="true"/>
|
||||||
|
<item android:drawable="@drawable/btn_back_green"/>
|
||||||
|
|
||||||
|
</selector>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user