refs #3520 feat:silex→salix

This commit is contained in:
Sergio De la torre 2024-04-19 08:53:41 +02:00
parent 0ae481ee4a
commit 0044fcfaa9
23 changed files with 340 additions and 923 deletions

View File

@ -16,7 +16,6 @@ abstract class BaseViewModel : ViewModel, LifecycleObserver {
constructor() : super() constructor() : super()
constructor(context: Context) : super() { constructor(context: Context) : super() {
app = context as MobileApplication app = context as MobileApplication
silex = app.silex
salix = app.salix salix = app.salix
} }
} }

View File

@ -14,7 +14,6 @@ import android.text.InputType.TYPE_CLASS_NUMBER
import android.text.InputType.TYPE_CLASS_TEXT import android.text.InputType.TYPE_CLASS_TEXT
import android.view.KeyEvent import android.view.KeyEvent
import android.view.KeyEvent.ACTION_DOWN import android.view.KeyEvent.ACTION_DOWN
import android.view.View
import android.view.View.GONE import android.view.View.GONE
import android.view.View.VISIBLE import android.view.View.VISIBLE
import android.view.WindowManager import android.view.WindowManager
@ -183,7 +182,6 @@ class CollectionFragmentPreChecker(
customDialog = CustomDialog(requireContext()) customDialog = CustomDialog(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
ma.hideBottomNavigation(GONE) ma.hideBottomNavigation(GONE)
binding.splashProgress.visibility = VISIBLE
setEvents() setEvents()
setToolBar() setToolBar()
if (collection.tickets.isNotEmpty()) { if (collection.tickets.isNotEmpty()) {
@ -278,7 +276,6 @@ class CollectionFragmentPreChecker(
} }
private fun updateScreen() { private fun updateScreen() {
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -342,30 +339,6 @@ class CollectionFragmentPreChecker(
hideKeyboard() hideKeyboard()
} }
/* private fun getCollection() {
binding.splashProgress.visibility = VISIBLE
if (!buttonPushedGetCollection) {
//Tarea 3520
viewModel.collection_get(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
print = "0",
type
)
buttonPushedGetCollection = true
} else {
viewModel.collectionTicketGet(
lastScanned,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
print = "0",
type
)
buttonPushedGetCollection = false
}
lastScanned = collection.collectionFk
}*/
private fun scanRequest() { private fun scanRequest() {
binding.scanInput.requestFocus() binding.scanInput.requestFocus()
@ -473,7 +446,7 @@ class CollectionFragmentPreChecker(
isMarking = false isMarking = false
binding.collectionSwipe.isRefreshing = false binding.collectionSwipe.isRefreshing = false
// if (type != PRECHECKER) { // if (type != PRECHECKER) {
binding.splashProgress.visibility = VISIBLE //
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -510,7 +483,7 @@ class CollectionFragmentPreChecker(
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashProgress.visibility = GONE //
collectionTicketList.observe(viewLifecycleOwner, Observer { collectionTicketList.observe(viewLifecycleOwner, Observer {
if (!it.isError) { if (!it.isError) {
@ -533,7 +506,7 @@ class CollectionFragmentPreChecker(
}) })
responseUsedShelves.observe(viewLifecycleOwner, Observer { responseUsedShelves.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE //
if (!goBack) { if (!goBack) {
ma.messageWithSound( ma.messageWithSound(
@ -544,10 +517,10 @@ class CollectionFragmentPreChecker(
}) })
responseParking.observe(viewLifecycleOwner, Observer { responseParking.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE //
if (!goBack) { if (!goBack) {
binding.splashProgress.visibility = GONE //
ma.messageWithSound( ma.messageWithSound(
if (it.isError) it.errorMessage else getString(R.string.Aparcado), if (it.isError) it.errorMessage else getString(R.string.Aparcado),
it.isError, true it.isError, true
@ -557,7 +530,7 @@ class CollectionFragmentPreChecker(
}) })
responsePrint.observe(viewLifecycleOwner, Observer { responsePrint.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE //
if (!goBack) { if (!goBack) {
@ -578,7 +551,7 @@ class CollectionFragmentPreChecker(
}) })
responseSplit.observe(viewLifecycleOwner) { responseSplit.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE //
if (!goBack) { if (!goBack) {
@ -605,7 +578,7 @@ class CollectionFragmentPreChecker(
ma.messageWithSound(it.errorMessage, true, true) ma.messageWithSound(it.errorMessage, true, true)
} else { } else {
ma.messageWithSound(getString(R.string.previousCollected), false, true) ma.messageWithSound(getString(R.string.previousCollected), false, true)
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -615,19 +588,17 @@ class CollectionFragmentPreChecker(
} }
}) })
placementSuppleyList.observe(viewLifecycleOwner, Observer { placementSuppleyList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) printShelvingResult(it) if (!goBack) printShelvingResult(it)
goBack = false goBack = false
}) })
item.observe(viewLifecycleOwner, Observer { item.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) toastDisponibility(it) if (!goBack) toastDisponibility(it)
goBack = false goBack = false
}) })
responseNew.observe(viewLifecycleOwner, Observer { responseNew.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
// if (!goBack) { // if (!goBack) {
if (it.isError) { if (it.isError) {
customDialog.setTitle(getString(R.string.disponibility)) customDialog.setTitle(getString(R.string.disponibility))
@ -638,10 +609,6 @@ class CollectionFragmentPreChecker(
}.show() }.show()
} else { } else {
binding.splashProgress.visibility =
VISIBLE
if (!goBack) { if (!goBack) {
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
@ -660,7 +627,7 @@ class CollectionFragmentPreChecker(
}) })
responseCode.observe(viewLifecycleOwner, Observer { responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (!goBack2) { if (!goBack2) {
if (it.isError) { if (it.isError) {
customDialog.setTitle(getString(R.string.error)) customDialog.setTitle(getString(R.string.error))
@ -711,7 +678,7 @@ class CollectionFragmentPreChecker(
})*/ })*/
//Tarea 4280 //Tarea 4280
responseTicketClosure.observe(viewLifecycleOwner, Observer { responseTicketClosure.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE //
if (!goBack) { if (!goBack) {
if (it.response.toBoolean()) { if (it.response.toBoolean()) {
var customDialogWarning = CustomDialog(requireContext()) var customDialogWarning = CustomDialog(requireContext())
@ -771,7 +738,6 @@ class CollectionFragmentPreChecker(
})*/ })*/
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer { responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
if (!goMistakeBack) if (!goMistakeBack)
@ -791,7 +757,7 @@ class CollectionFragmentPreChecker(
mistakeList.observe(viewLifecycleOwner, Observer { mistakeList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
/*sergio:se quita y se pone esta comprobacion porque si no aparece de nuevo otra vez al volver atrás */ /*sergio:se quita y se pone esta comprobacion porque si no aparece de nuevo otra vez al volver atrás */
if (!goMistakeBack) if (!goMistakeBack)
@ -801,7 +767,7 @@ class CollectionFragmentPreChecker(
//sergio: para si hay algun ticket por revisar antes de parkinear //sergio: para si hay algun ticket por revisar antes de parkinear
responseCollectionUnchecked.observe(viewLifecycleOwner, Observer { responseCollectionUnchecked.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE //
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false) ma.messageWithSound(it.errorMessage, it.isError, false)
@ -816,7 +782,7 @@ class CollectionFragmentPreChecker(
} }
.setKoButton(getString(R.string.review)) { .setKoButton(getString(R.string.review)) {
binding.splashProgress.visibility = View.VISIBLE //
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
it.response.toInt(), it.response.toInt(),
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -839,9 +805,8 @@ class CollectionFragmentPreChecker(
loadResponseDel.observe(viewLifecycleOwner) { event -> loadResponseDel.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull { event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.INVISIBLE
if (it.isError) { if (it.isError) {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false) ma.messageWithSound(it.errorMessage, it.isError, false)
@ -863,7 +828,7 @@ class CollectionFragmentPreChecker(
/* responseDel.observe(viewLifecycleOwner, Observer { /* responseDel.observe(viewLifecycleOwner, Observer {
if (it.isError) { if (it.isError) {
binding.splashProgress.visibility = GONE //
if (!goBack) { if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false) ma.messageWithSound(it.errorMessage, it.isError, false)
@ -898,14 +863,13 @@ class CollectionFragmentPreChecker(
responseSaleReplace.observe(viewLifecycleOwner, Observer { responseSaleReplace.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
if (!goBack) { if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, true) ma.messageWithSound(it.errorMessage, it.isError, true)
binding.splashProgress.visibility = VISIBLE //
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -927,12 +891,12 @@ class CollectionFragmentPreChecker(
loadResponseSaleTrackingMark.observe(viewLifecycleOwner) { event -> loadResponseSaleTrackingMark.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull { event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
if (!goBack) { if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, true) ma.messageWithSound(it.errorMessage, it.isError, true)
binding.splashProgress.visibility = VISIBLE //
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -1014,7 +978,6 @@ class CollectionFragmentPreChecker(
state = 0 state = 0
binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString() binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString()
binding.splashProgress.visibility = View.GONE
var salesList: ArrayList<SaleVO> = ArrayList() var salesList: ArrayList<SaleVO> = ArrayList()
tickets = ArrayList() tickets = ArrayList()
var observations = "" var observations = ""
@ -1100,7 +1063,7 @@ class CollectionFragmentPreChecker(
object : OnMistakeClickListener { object : OnMistakeClickListener {
override fun onMistakeClickListener(sale: SaleVO) { override fun onMistakeClickListener(sale: SaleVO) {
//Tarea #4969 //Tarea #4969
binding.splashProgress.visibility = VISIBLE
viewModel.mistakeType() viewModel.mistakeType()
mistakeSale = sale mistakeSale = sale
goMistakeBack = false goMistakeBack = false
@ -1299,8 +1262,6 @@ class CollectionFragmentPreChecker(
} }
} else { } else {
binding.splashProgress.visibility =
VISIBLE
storedPosition = 0 storedPosition = 0
storedBackPosition = 0 storedBackPosition = 0
// if (type != PRECHECKER) { // if (type != PRECHECKER) {
@ -1314,7 +1275,7 @@ class CollectionFragmentPreChecker(
) )
} catch (ex: Exception) { } catch (ex: Exception) {
binding.splashProgress.visibility = GONE
ma.messageWithSound( ma.messageWithSound(
getString(R.string.error), getString(R.string.error),
isError = false, isError = false,
@ -1520,7 +1481,6 @@ class CollectionFragmentPreChecker(
} }
private fun saleTrackingReplace(position: Int, type: String) { private fun saleTrackingReplace(position: Int, type: String) {
//binding.splashProgress.visibility=VISIBLE
viewModel.saleTrackingReplace( viewModel.saleTrackingReplace(
saleFk = sales[position].saleFk, saleFk = sales[position].saleFk,
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1", isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
@ -1536,7 +1496,7 @@ class CollectionFragmentPreChecker(
//Tarea #4371 se quita para ver si funciona correctamente //Tarea #4371 se quita para ver si funciona correctamente
private fun saleTracking_mark(position: Int, type: String) { private fun saleTracking_mark(position: Int, type: String) {
binding.splashProgress.visibility = VISIBLE
viewModel.run { viewModel.run {
saleTracking_mark( saleTracking_mark(
saleFk = sales[position].saleFk, saleFk = sales[position].saleFk,
@ -1566,7 +1526,7 @@ class CollectionFragmentPreChecker(
setListPosition(position, false) setListPosition(position, false)
if (type != PRECHECKER) { if (type != PRECHECKER) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingUpdateFromSale( viewModel.itemShelvingUpdateFromSale(
sales[position].saleFk sales[position].saleFk
@ -1596,7 +1556,7 @@ class CollectionFragmentPreChecker(
private fun showShelving(position: Int, shelvingPosition: Int) { private fun showShelving(position: Int, shelvingPosition: Int) {
storedShelvingPosition = shelvingPosition storedShelvingPosition = shelvingPosition
storedPosition = position storedPosition = position
binding.splashProgress.visibility = VISIBLE
var quantityGet = 0 var quantityGet = 0
try { try {
quantityGet = quantityGet =
@ -1675,9 +1635,6 @@ class CollectionFragmentPreChecker(
customDialogList.dismiss() customDialogList.dismiss()
} else { } else {
itemShelvingFkStored = itemShelvingFk itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility =
VISIBLE
viewModel.getIdFromCodeSalix( viewModel.getIdFromCodeSalix(
code = customDialogList.getValueTwo(), code = customDialogList.getValueTwo(),
) )
@ -1760,7 +1717,7 @@ class CollectionFragmentPreChecker(
customDialogList.dismiss() customDialogList.dismiss()
} else { } else {
itemShelvingFkStored = itemShelvingFk itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCodeSalix( viewModel.getIdFromCodeSalix(
@ -1960,8 +1917,6 @@ class CollectionFragmentPreChecker(
) { ) {
getString(R.string.Todosloscampossonobligatorios).toast(requireContext()) getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
} else { } else {
binding.splashProgress.visibility =
VISIBLE
//sergio datos para mensaje salix //sergio datos para mensaje salix
@ -2028,8 +1983,6 @@ class CollectionFragmentPreChecker(
) { ) {
getString(R.string.Todosloscampossonobligatorios).toast(requireContext()) getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
} else { } else {
binding.splashProgress.visibility =
VISIBLE
dataMessageSalix = DataMessageSalix( dataMessageSalix = DataMessageSalix(
ticket = ticketSelected, ticket = ticketSelected,
@ -2176,7 +2129,7 @@ class CollectionFragmentPreChecker(
private fun customDialogSetUsed() { private fun customDialogSetUsed() {
if (!customDialogInput.getValue().isNullOrEmpty()) { if (!customDialogInput.getValue().isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.ticketCollection_setUsedShelves( viewModel.ticketCollection_setUsedShelves(
ticketFk = collection.collectionFk, ticketFk = collection.collectionFk,
usedShelves = customDialogInput.getValue().toInt() usedShelves = customDialogInput.getValue().toInt()
@ -2262,7 +2215,7 @@ class CollectionFragmentPreChecker(
} }
saleAdapter!!.notifyDataSetChanged() saleAdapter!!.notifyDataSetChanged()
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -2402,7 +2355,7 @@ class CollectionFragmentPreChecker(
private fun showMistakeList(list: List<MistakeTypeVO>) { private fun showMistakeList(list: List<MistakeTypeVO>) {
customDialogInput.dismiss() customDialogInput.dismiss()
binding.splashProgress.visibility = GONE
listPlacementSupply = ArrayList() listPlacementSupply = ArrayList()
list.forEach { list.forEach {
listPlacementSupply.add(BarcodeVO(code = it.description)) listPlacementSupply.add(BarcodeVO(code = it.description))

View File

@ -199,6 +199,10 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
val loadResponseItemShelvingUpdate: LiveData<Event<ResponseItemVO>> = val loadResponseItemShelvingUpdate: LiveData<Event<ResponseItemVO>> =
_responseItemShelvingUpdate.map { Event(it) } _responseItemShelvingUpdate.map { Event(it) }
private val _responseSaleAddPrevOK by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleAddPrevOK: LiveData<ResponseItemVO>
get() = _responseSaleAddPrevOK
fun getSales( fun getSales(
collectionFk: Int, collectionFk: Int,
print: String, print: String,
@ -233,48 +237,9 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
print: String, print: String,
type: String type: String
) { ) {
if (type == "PRECHECKER" || type == "PREPARED" || type == "CHECKER" || type == "SHOWTICKET") {
getSales(collectionFk, print, type)
} else {
silex.collection_getTickets( getSales(collectionFk, print, type)
collectionFk,
sectorFk,
print,
type
)
.enqueue(object :
SilexCallback<CollectionVO>(context) {
override fun onError(t: Throwable) {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
}
override fun onSuccess(response: Response<CollectionVO>) {
if (response.body() != null) {
_collectionTicketList.value =
response.body()?.let { it.map(contextApp) }
} else {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}
} }
//Tarea 6276 Salix collection_getTickets //Tarea 6276 Salix collection_getTickets
@ -314,47 +279,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
}) })
} }
/* fun collection_get(
collectionFk: Int,
sectorFk: Int,
print: String,
type: String
) {
//Falta back de Salix
// salix.collectionGet(params = arrayListOf(collectionFk, sectorFk, print, type).formatWithQuotes())
silex.collection_get(
collectionFk,
sectorFk,
print,
type
)
.enqueue(object :
SalixCallback<CollectionVO>(context) {
override fun onError(t: Throwable) {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<CollectionVO>) {
if (response.body() != null) {
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
} else {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}*/
fun collectionGetId( fun collectionGetId(
ticketFk: Int, ticketFk: Int,
@ -1119,76 +1044,40 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
}) })
} }
/* fun collection_getUncheckedTicket(
collectionFk: Int
) {
silex.collection_getUncheckedTicket(
collectionFk
).enqueue(object :
SalixCallback<String>(context) {
override fun onError(t: Throwable) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<String>) {
if (response.body() != null) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = false,
response = response.body()!!,
errorMessage = ""
)
} else {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
response = response.body()!!.toString(),
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}*/
fun hasUncheckedTicket( fun hasUncheckedTicket(
collectionFk: Int collectionFk: Int
) { ) {
salix.hasUncheckedTicket(collectionFk) salix.hasUncheckedTicket(collectionFk)
//silex.collection_getUncheckedTicket(collectionFk) //silex.collection_getUncheckedTicket(collectionFk)
.enqueue(object : .enqueue(object :
SalixCallback<String>(context) { SalixCallback<String>(context) {
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<String>) {
if (response.body() != null) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = false,
response = response.body()!!,
errorMessage = ""
)
} else {
_responseCollectionUnchecked.value = ResponseItemVO( _responseCollectionUnchecked.value = ResponseItemVO(
isError = true, isError = true,
response = response.body()!!.toString(), errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
) )
} }
}
}) override fun onSuccess(response: Response<String>) {
if (response.body() != null) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = false,
response = response.body()!!,
errorMessage = ""
)
} else {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
response = response.body()!!.toString(),
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
} }
fun collection_setState( fun collection_setState(
@ -1219,4 +1108,28 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
}) })
} }
fun saleTrackingAddPrevOK(
sectorCollectionFk: Int
) {
salix.saleTrackingAddPrevOK(arrayListOf(sectorCollectionFk))
.enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
override fun onSuccess(response: Response<Any>) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
})
}
} }

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.controlador.fragment package es.verdnatura.presentation.view.feature.controlador.fragment
import android.content.Context import android.content.Context
import android.view.View
import android.view.View.VISIBLE import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
@ -34,7 +33,7 @@ class ControladorFragment :
override fun init() { override fun init() {
binding.splashProgress.visibility = View.GONE
binding.scanInput.visibility = VISIBLE binding.scanInput.visibility = VISIBLE
binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket) binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket)
setEvents() setEvents()
@ -58,7 +57,7 @@ class ControladorFragment :
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) { if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
goBack = false goBack = false
if (!binding.scanInput.text.isNullOrEmpty()) { if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString())) binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString()))
//Tarea 6458 descomentar si ok //Tarea 6458 descomentar si ok
collectionViewModel = CollectionViewModel(mobileApplication) collectionViewModel = CollectionViewModel(mobileApplication)
@ -66,7 +65,7 @@ class ControladorFragment :
collectionViewModel!!.responseTicketState.observe( collectionViewModel!!.responseTicketState.observe(
viewLifecycleOwner, viewLifecycleOwner,
Observer { it -> Observer { it ->
binding.splashProgress.visibility = View.GONE
if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) { if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) {
var customDialogWarning = CustomDialog(requireContext()) var customDialogWarning = CustomDialog(requireContext())
customDialogWarning.setTitle(getString(R.string.info)) customDialogWarning.setTitle(getString(R.string.info))
@ -79,8 +78,6 @@ class ControladorFragment :
) )
.setOkButton(getString(R.string.aware)) { .setOkButton(getString(R.string.aware)) {
customDialogWarning.dismiss() customDialogWarning.dismiss()
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey( sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(
ConstAndValues.SECTORFK ConstAndValues.SECTORFK
@ -88,7 +85,7 @@ class ControladorFragment :
collectionFk = binding.scanInput.text.toString() collectionFk = binding.scanInput.text.toString()
.toInt(), .toInt(),
print = "0", print = "0",
type = ConstAndValues.CONTROLADOR type = ConstAndValues.ON_CHECKING
) )
}.setKoButton(getString(R.string.cancel)){ }.setKoButton(getString(R.string.cancel)){
binding.scanInput.setText("") binding.scanInput.setText("")
@ -103,7 +100,7 @@ class ControladorFragment :
), ),
collectionFk = binding.scanInput.text.toString().toInt(), collectionFk = binding.scanInput.text.toString().toInt(),
print = "0", print = "0",
type = ConstAndValues.CONTROLADOR type = ConstAndValues.ON_CHECKING
) )
} }
}) })
@ -120,7 +117,6 @@ class ControladorFragment :
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
collectionTicketList.observe(viewLifecycleOwner, Observer { collectionTicketList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
binding.scanInput.setText("") binding.scanInput.setText("")
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, isError = true, isPlayed = false) ma.messageWithSound(it.errorMessage, isError = true, isPlayed = false)

View File

@ -115,7 +115,6 @@ class EndSacadorFragment(
customDialogInput = CustomDialogInput(requireContext()) customDialogInput = CustomDialogInput(requireContext())
customDialogInputParking = CustomDialogInput(requireContext()) customDialogInputParking = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
binding.splashProgress.visibility = GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.getticketpre) binding.mainToolbar.toolbarTitle.text = getString(R.string.getticketpre)
setToolBar() setToolBar()
setEvents() setEvents()
@ -191,7 +190,6 @@ class EndSacadorFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
salesList.observe(viewLifecycleOwner, Observer { salesList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
createSaleList(it) createSaleList(it)
}) })
@ -212,7 +210,6 @@ class EndSacadorFragment(
}) })
placementSuppleyList.observe(viewLifecycleOwner, Observer { placementSuppleyList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) printShelvingResult(it) if (!goBack) printShelvingResult(it)
goBack = false goBack = false
}) })
@ -232,7 +229,6 @@ class EndSacadorFragment(
responseParkingAdd.observe(viewLifecycleOwner, Observer { responseParkingAdd.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false) ma.messageWithSound(it.errorMessage, true, false)
@ -255,7 +251,6 @@ class EndSacadorFragment(
}) })
responseSplit.observe(viewLifecycleOwner, Observer { responseSplit.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, isError = true, true) ma.messageWithSound(it.errorMessage, isError = true, true)
@ -271,7 +266,6 @@ class EndSacadorFragment(
loadResponseSaleGropAdd.observe(viewLifecycleOwner) { event -> loadResponseSaleGropAdd.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull { event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
if (it.isError) { if (it.isError) {
@ -294,7 +288,6 @@ class EndSacadorFragment(
responseSaleAddPrevOK.observe(viewLifecycleOwner, Observer { responseSaleAddPrevOK.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
if (it.isError) { if (it.isError) {
@ -312,7 +305,6 @@ class EndSacadorFragment(
goBack = false goBack = false
}) })
response.observe(viewLifecycleOwner, Observer { response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
if (it.isError) { if (it.isError) {
@ -326,7 +318,6 @@ class EndSacadorFragment(
goBack = false goBack = false
}) })
responseSaleupdateIsChecked.observe(viewLifecycleOwner, Observer { responseSaleupdateIsChecked.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
@ -351,7 +342,6 @@ class EndSacadorFragment(
}) })
responseItemShelvingSaleSupplyAdd.observe(viewLifecycleOwner, Observer { responseItemShelvingSaleSupplyAdd.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) { if (!goBack) {
if (it.isError) { if (it.isError) {
@ -364,7 +354,7 @@ class EndSacadorFragment(
}) })
responseCode.observe(viewLifecycleOwner, Observer { responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack2) { if (!goBack2) {
if (it.isError) { if (it.isError) {
customDialog.setTitle(getString(R.string.error)) customDialog.setTitle(getString(R.string.error))
@ -427,7 +417,7 @@ class EndSacadorFragment(
//CREATE LIST //CREATE LIST
private fun searchSaleCollection() { private fun searchSaleCollection() {
binding.splashProgress.visibility = VISIBLE
viewModel.sectorCollectionGetSale( viewModel.sectorCollectionGetSale(
collection.collectionFk, collection.collectionFk,
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK) sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK)
@ -439,7 +429,6 @@ class EndSacadorFragment(
ticket = ticketFk ticket = ticketFk
if (ticketFk != 0) if (ticketFk != 0)
binding.splashProgress.visibility = VISIBLE
viewModel.sectorCollectionSaleGroupAdd( viewModel.sectorCollectionSaleGroupAdd(
ticketFk, ticketFk,
collection.collectionFk collection.collectionFk
@ -447,7 +436,7 @@ class EndSacadorFragment(
} }
private fun createSaleList(salesList: List<PreSacadorItemVO>) { private fun createSaleList(salesList: List<PreSacadorItemVO>) {
binding.splashProgress.visibility = GONE
if (salesList.isNullOrEmpty()) { if (salesList.isNullOrEmpty()) {
ma.messageWithSound( ma.messageWithSound(
@ -547,8 +536,6 @@ class EndSacadorFragment(
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
if (totalMark == sales.size) { if (totalMark == sales.size) {
getString(R.string.ticketCompleted).toast(this.context, Toast.LENGTH_SHORT) getString(R.string.ticketCompleted).toast(this.context, Toast.LENGTH_SHORT)
binding.splashProgress.visibility = VISIBLE
viewModel.saleTrackingAddPrevOK( viewModel.saleTrackingAddPrevOK(
sectorCollectionFk = collection.collectionFk sectorCollectionFk = collection.collectionFk
) )
@ -684,7 +671,6 @@ class EndSacadorFragment(
private fun showShelving(position: Int, shelvingPosition: Int) { private fun showShelving(position: Int, shelvingPosition: Int) {
storedShelvingPosition = shelvingPosition storedShelvingPosition = shelvingPosition
storedPosition = position storedPosition = position
binding.splashProgress.visibility = VISIBLE
var quantityGet = 0 var quantityGet = 0
try { try {
quantityGet = (sales[position].saldo!! - sales[position].picked!!) quantityGet = (sales[position].saldo!! - sales[position].picked!!)
@ -739,7 +725,6 @@ class EndSacadorFragment(
customDialogList.dismiss() customDialogList.dismiss()
} else { } else {
itemShelvingFkStored = itemShelvingFk itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCode( viewModel.getIdFromCode(
code = customDialogList.getValueTwo() code = customDialogList.getValueTwo()
) )
@ -797,7 +782,6 @@ class EndSacadorFragment(
customDialogList.dismiss() customDialogList.dismiss()
} else { } else {
itemShelvingFkStored = itemShelvingFk itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCode( viewModel.getIdFromCode(
code = customDialogList.getValueTwo() code = customDialogList.getValueTwo()
) )

View File

@ -70,7 +70,7 @@ class AutomaticAddItemFragment(
binding.editMatricula.requestFocus() binding.editMatricula.requestFocus()
binding.editMatricula.setOnEditorActionListener { v, actionId, event -> binding.editMatricula.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE ||actionId == 0 || actionId == 5) { if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!binding.editMatricula.text.toString().isNullOrEmpty()) { if (!binding.editMatricula.text.toString().isNullOrEmpty()) {
contador += 1 contador += 1
setSubtitle() setSubtitle()
@ -118,7 +118,6 @@ class AutomaticAddItemFragment(
mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK) mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK)
) )
} else { } else {
binding.splashAnimation.visibility = View.VISIBLE
viewModel.itemShelvingMakeMulti( viewModel.itemShelvingMakeMulti(
shelvingFk, shelvingFk,
listString, listString,
@ -134,7 +133,6 @@ class AutomaticAddItemFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashAnimation.visibility = View.INVISIBLE
response.observe(viewLifecycleOwner, Observer { response.observe(viewLifecycleOwner, Observer {
ma.onMyBackPressed() ma.onMyBackPressed()
}) })

View File

@ -9,6 +9,7 @@ import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.workermistake.model.MakeMultiSalix
import retrofit2.Response import retrofit2.Response
class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) { class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
@ -22,11 +23,8 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
items: List<Long>, items: List<Long>,
warehouseFk: Int warehouseFk: Int
) { ) {
//Tarea 6276 A MODIFICAR SI O SI. MAÑANA // Falta cambiar el
//salix.upsertItem(MakeMultiSalix(shelvingFk,items,warehouseFk)) salix.upsertItem(MakeMultiSalix(shelvingFk, items, warehouseFk))
//falta cambiar el procedimiento si no no coge bien las cantidades, no las multiplica si el packing es 2 por ejemplo.
// Escanear dos veces un 10 pero pone un dos = 2x20 cuando debería ser 40.
silex.itemShelvingMake_multi(shelvingFk, items, warehouseFk)
.enqueue(object : .enqueue(object :
SalixCallback<Any>(context) { SalixCallback<Any>(context) {
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
@ -44,6 +42,7 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
} }
}) })
} }
fun itemShelvingAddList( fun itemShelvingAddList(

View File

@ -51,7 +51,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:gravity="start" android:gravity="start"
android:text="@string/Entrada" android:text="@string/entry"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" /> android:textSize="@dimen/body1" />
@ -123,7 +123,7 @@
<LinearLayout <LinearLayout
android:id="@+id/splash_progress" android:id="@+id/splash_animation"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6" android:background="@color/verdnatura_black_8_alpha_6"

View File

@ -84,28 +84,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_animation"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
>
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,17 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
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"
android:clickable="false"> android:clickable="false">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/verdnatura_black" android:background="@color/verdnatura_black">
>
<EditText <EditText
@ -19,27 +16,26 @@
style="@style/ScanLineTextSearch" style="@style/ScanLineTextSearch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autofillHints="name"
android:hint="@string/Escaner" android:hint="@string/Escaner"
android:inputType="textVisiblePassword" android:inputType="textVisiblePassword"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:paddingStart="@dimen/default_layout_margin"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar" app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
android:paddingStart="@dimen/default_layout_margin"
android:autofillHints="name"/>
<ImageView <ImageView
android:id="@+id/previaButton" android:id="@+id/previaButton"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:visibility="invisible" android:contentDescription="@string/error"
android:tooltipText="Permite marcar las líneas de previa escaneando ticket" android:tooltipText="Permite marcar las líneas de previa escaneando ticket"
app:srcCompat="@drawable/ic_streetview_black_24dp" android:visibility="invisible"
app:layout_constraintStart_toEndOf="@+id/scan_input" app:layout_constraintStart_toEndOf="@+id/scan_input"
app:layout_constraintTop_toTopOf="@+id/scan_input" app:layout_constraintTop_toTopOf="@+id/scan_input"
android:contentDescription="@string/error" app:srcCompat="@drawable/ic_streetview_black_24dp" />
/>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/collection_swipe" android:id="@+id/collection_swipe"
@ -52,34 +48,14 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/fragment_sacador_collections" android:id="@+id/fragment_sacador_collections"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
tools:listitem="@layout/item_article_row_fragment" /> tools:listitem="@layout/item_article_row_fragment" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"

View File

@ -61,24 +61,6 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"

View File

@ -30,27 +30,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -31,27 +31,5 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout </androidx.constraintlayout.widget.ConstraintLayout>
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -207,55 +207,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<LinearLayout
android:id="@+id/splash_progress_two"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -143,31 +143,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout </layout>
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -85,26 +85,5 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout </layout>
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -174,31 +174,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout </layout>
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible"
android:textSize="@dimen/body2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -50,27 +50,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout </androidx.constraintlayout.widget.ConstraintLayout>
android:id="@+id/splash_progress" </layout>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -47,23 +47,6 @@
tools:listitem="@layout/item_article_row_reubication_fragment" /> tools:listitem="@layout/item_article_row_reubication_fragment" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"

View File

@ -33,28 +33,5 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout </layout>
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -64,27 +64,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout </layout>
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -32,28 +32,5 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout </layout>
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>