ubicador
This commit is contained in:
parent
c0fae9e219
commit
59f946ffe0
|
@ -72,4 +72,5 @@ dependencies {
|
||||||
implementation "com.github.bumptech.glide:glide:$glide"
|
implementation "com.github.bumptech.glide:glide:$glide"
|
||||||
implementation "com.github.bumptech.glide:okhttp3-integration:$glide"
|
implementation "com.github.bumptech.glide:okhttp3-integration:$glide"
|
||||||
kapt "com.github.bumptech.glide:compiler:$glide"
|
kapt "com.github.bumptech.glide:compiler:$glide"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryView
|
||||||
import es.verdnatura.presentation.view.feature.login.fragment.LoginViewModel
|
import es.verdnatura.presentation.view.feature.login.fragment.LoginViewModel
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroViewModel
|
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroViewModel
|
||||||
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingViewModel
|
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingViewModel
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewModel
|
||||||
import org.koin.androidx.viewmodel.dsl.viewModel
|
import org.koin.androidx.viewmodel.dsl.viewModel
|
||||||
import org.koin.dsl.module
|
import org.koin.dsl.module
|
||||||
|
|
||||||
|
@ -46,6 +47,11 @@ val viewModelModule = module{
|
||||||
ShelvingParkingViewModel()
|
ShelvingParkingViewModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ubicador
|
||||||
|
viewModel {
|
||||||
|
UbicadorViewModel()
|
||||||
|
}
|
||||||
|
|
||||||
// Ajustes
|
// Ajustes
|
||||||
viewModel {
|
viewModel {
|
||||||
AjustesViewModel()
|
AjustesViewModel()
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package es.verdnatura.domain
|
||||||
|
|
||||||
|
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||||
|
import retrofit2.Call
|
||||||
|
|
||||||
|
class GetUbicadorUserCase : RestClient() {
|
||||||
|
|
||||||
|
fun itemShelvingList(usuario:String,password:String,vShelvingFk:String) : Call<List<ItemUbicadorVO>> {
|
||||||
|
val params:ArrayList<String> = ArrayList();
|
||||||
|
params.add(vShelvingFk)
|
||||||
|
|
||||||
|
return restClient!!.itemShelvingList("json","1",usuario,password,"application/json",params)!!
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,12 +1,14 @@
|
||||||
package es.verdnatura.domain
|
package es.verdnatura.domain
|
||||||
|
|
||||||
|
|
||||||
|
import es.verdnatura.databinding.ItemUbicationRowBinding
|
||||||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
|
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
|
||||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||||
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
|
@ -159,5 +161,15 @@ interface VerdnaturaService {
|
||||||
@Body params: List<String>):
|
@Body params: List<String>):
|
||||||
Call<List<ItemShelvingParkingVO>>
|
Call<List<ItemShelvingParkingVO>>
|
||||||
|
|
||||||
|
//UBICADOR ========================================================================>
|
||||||
|
@POST("almacenv2/itemShelvingList")
|
||||||
|
fun itemShelvingList(@Header("aplicacion") aplicacion: String,
|
||||||
|
@Header("version") version: String,
|
||||||
|
@Header("user") user: String,
|
||||||
|
@Header("pass") pass: String,
|
||||||
|
@Header("Content-Type") content_type: String,
|
||||||
|
@Body params: List<String>):
|
||||||
|
Call<List<ItemUbicadorVO>>
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -5,11 +5,13 @@ import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import es.verdnatura.databinding.ItemLocationRowBinding
|
import es.verdnatura.databinding.ItemLocationRowBinding
|
||||||
import es.verdnatura.presentation.common.OnLocationRowClickListener
|
import es.verdnatura.presentation.common.OnLocationRowClickListener
|
||||||
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||||
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
|
|
||||||
class LocationAdapter (
|
class LocationAdapter (
|
||||||
private val items: List<ItemLocationVO>,
|
private val items: List<ItemLocationVO>,
|
||||||
private val onLocationRowClickListener: OnLocationRowClickListener
|
private val onPasillerosItemClickListener: OnPasillerosItemClickListener
|
||||||
): RecyclerView.Adapter<LocationAdapter.ItemHolder> () {
|
): RecyclerView.Adapter<LocationAdapter.ItemHolder> () {
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ class LocationAdapter (
|
||||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||||
holder.bind(items[position])
|
holder.bind(items[position])
|
||||||
holder.binding.root.setOnClickListener {
|
holder.binding.root.setOnClickListener {
|
||||||
onLocationRowClickListener.onLocationRowClickListener(items[position])
|
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Ubicador"),items[position].Matricula)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package es.verdnatura.presentation.view.feature.buscaritem.fragment
|
package es.verdnatura.presentation.view.feature.buscaritem.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
|
@ -10,6 +11,7 @@ import es.verdnatura.databinding.FragmentBuscarItemBinding
|
||||||
import es.verdnatura.domain.notNull
|
import es.verdnatura.domain.notNull
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.OnLocationRowClickListener
|
import es.verdnatura.presentation.common.OnLocationRowClickListener
|
||||||
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.feature.buscaritem.adapter.LocationAdapter
|
import es.verdnatura.presentation.view.feature.buscaritem.adapter.LocationAdapter
|
||||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||||
|
@ -27,11 +29,16 @@ class BuscarItemFragment(
|
||||||
private var warehouseFk = ""
|
private var warehouseFk = ""
|
||||||
private var adapter : LocationAdapter? = null
|
private var adapter : LocationAdapter? = null
|
||||||
private lateinit var customDialog: CustomDialog
|
private lateinit var customDialog: CustomDialog
|
||||||
|
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(entryPoint:String) = BuscarItemFragment(entryPoint)
|
fun newInstance(entryPoint:String) = BuscarItemFragment(entryPoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onAttach(context: Context) {
|
||||||
|
if (context is OnPasillerosItemClickListener) pasillerosItemClickListener = context
|
||||||
|
super.onAttach(context)
|
||||||
|
}
|
||||||
override fun getLayoutId(): Int = R.layout.fragment_buscar_item
|
override fun getLayoutId(): Int = R.layout.fragment_buscar_item
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
@ -79,15 +86,10 @@ class BuscarItemFragment(
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel){
|
with(viewModel){
|
||||||
loadLocationList.observe(viewLifecycleOwner, Observer { event ->
|
loadLocationList.observe(viewLifecycleOwner, Observer { event ->
|
||||||
splash_progress.visibility = View.GONE
|
|
||||||
event.getContentIfNotHandled().notNull {
|
event.getContentIfNotHandled().notNull {
|
||||||
|
splash_progress.visibility = View.GONE
|
||||||
adapter = LocationAdapter(it.list,object: OnLocationRowClickListener{
|
adapter = LocationAdapter(it.list,pasillerosItemClickListener!!)
|
||||||
override fun onLocationRowClickListener(item: ItemLocationVO) {
|
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
location_recyclerview.adapter = adapter
|
location_recyclerview.adapter = adapter
|
||||||
location_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
location_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
|
|
@ -23,6 +23,7 @@ import es.verdnatura.presentation.view.feature.main.model.ItemMenuVO
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroFragment
|
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroFragment
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment
|
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
|
@ -152,9 +153,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClick
|
||||||
"Faltas" -> {
|
"Faltas" -> {
|
||||||
addFragmentOnTop(FaltasFragment.newInstance())
|
addFragmentOnTop(FaltasFragment.newInstance())
|
||||||
}
|
}
|
||||||
"Shelving Parking"-> {
|
"Shelving Parking" -> {
|
||||||
addFragmentOnTop(ShelvingParkingFragment.newInstance())
|
addFragmentOnTop(ShelvingParkingFragment.newInstance())
|
||||||
}
|
}
|
||||||
|
"Ubicador" -> {
|
||||||
|
addFragmentOnTop(UbicadorFragment.newInstance(entryPoint))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Log.i("Item: ",item.title)
|
Log.i("Item: ",item.title)
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.adapter.PasillerosAdapter
|
import es.verdnatura.presentation.view.feature.pasillero.adapter.PasillerosAdapter
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.fragment_pasillero.*
|
import kotlinx.android.synthetic.main.fragment_pasillero.*
|
||||||
|
import kotlinx.android.synthetic.main.toolbar.*
|
||||||
|
|
||||||
class PasilleroFragment : BaseFragment<FragmentPasilleroBinding,PasilleroViewModel>(PasilleroViewModel::class){
|
class PasilleroFragment : BaseFragment<FragmentPasilleroBinding,PasilleroViewModel>(PasilleroViewModel::class){
|
||||||
|
|
||||||
|
@ -29,6 +30,8 @@ class PasilleroFragment : BaseFragment<FragmentPasilleroBinding,PasilleroViewMod
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
activity!!.main_bottom_navigation.visibility = View.VISIBLE
|
activity!!.main_bottom_navigation.visibility = View.VISIBLE
|
||||||
|
toolbar_title.text = "Verdnatura"
|
||||||
|
backButton.visibility = View.GONE
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.ubicador.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import es.verdnatura.databinding.ItemShelvingparkingRowBinding
|
||||||
|
import es.verdnatura.databinding.ItemUbicationRowBinding
|
||||||
|
import es.verdnatura.presentation.common.loadUrl
|
||||||
|
import es.verdnatura.presentation.view.feature.shelvingparking.adapter.ShelvingParkingAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||||
|
|
||||||
|
class UbicadorAdapter (
|
||||||
|
private val items: List<ItemUbicadorVO>
|
||||||
|
): RecyclerView.Adapter<UbicadorAdapter.ItemHolder> () {
|
||||||
|
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||||
|
return ItemHolder(
|
||||||
|
ItemUbicationRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount() =items.size
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||||
|
holder.bind(items[position])
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ItemHolder(
|
||||||
|
val binding: ItemUbicationRowBinding
|
||||||
|
) : RecyclerView.ViewHolder(binding.root){
|
||||||
|
private val res = binding.root.context.resources
|
||||||
|
fun bind(item: ItemUbicadorVO) {
|
||||||
|
binding.apply {
|
||||||
|
this.item = item
|
||||||
|
multiText.text = item.stickers+"x"+item.packing
|
||||||
|
imgItem.loadUrl("https://verdnatura.es/vn-image-data/catalog/200x200/"+item.item);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,127 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.ubicador.fragment
|
||||||
|
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.view.View
|
||||||
|
import android.view.inputmethod.EditorInfo
|
||||||
|
import androidx.lifecycle.Observer
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.FragmentUbicadorBinding
|
||||||
|
import es.verdnatura.domain.notNull
|
||||||
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
|
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
|
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||||
|
import es.verdnatura.presentation.view.feature.shelvingparking.adapter.ShelvingParkingAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.adapter.UbicadorAdapter
|
||||||
|
|
||||||
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_buscar_item.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_ubicador.*
|
||||||
|
import kotlinx.android.synthetic.main.fragment_ubicador.location_recyclerview
|
||||||
|
import kotlinx.android.synthetic.main.fragment_ubicador.splash_progress
|
||||||
|
import kotlinx.android.synthetic.main.toolbar.*
|
||||||
|
|
||||||
|
class UbicadorFragment(
|
||||||
|
var shelvingFk:String = ""
|
||||||
|
) : BaseFragment<FragmentUbicadorBinding, UbicadorViewModel>(
|
||||||
|
UbicadorViewModel::class) {
|
||||||
|
|
||||||
|
private var user = ""
|
||||||
|
private var password = ""
|
||||||
|
private var sectorFk = ""
|
||||||
|
private var warehouseFk = ""
|
||||||
|
private var adapter : UbicadorAdapter? = null
|
||||||
|
private lateinit var customDialogInput: CustomDialogInput
|
||||||
|
private var listInvetory:ArrayList<ItemInventaryVO> = ArrayList()
|
||||||
|
private var listInvetoryAux:ArrayList<ItemInventaryVO> = ArrayList()
|
||||||
|
private lateinit var customDialog: CustomDialog
|
||||||
|
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(entryPoint:String) = UbicadorFragment(entryPoint)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int = R.layout.fragment_ubicador
|
||||||
|
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
|
||||||
|
val prefs: SharedPreferences = activity!!.getSharedPreferences(PREFS_USER,0)
|
||||||
|
user = prefs.getString(USER,"").toString()
|
||||||
|
password = prefs.getString(PASSWORD,"").toString()
|
||||||
|
sectorFk = prefs.getInt(SECTORFK,1).toString()
|
||||||
|
warehouseFk = prefs.getInt(WAREHOUSEFK,1).toString()
|
||||||
|
customDialogInput = CustomDialogInput(requireContext())
|
||||||
|
customDialog = CustomDialog(requireContext())
|
||||||
|
activity!!.main_bottom_navigation.visibility = View.GONE
|
||||||
|
toolbar_title.text = "itemShelvingList"
|
||||||
|
setEvents()
|
||||||
|
setToolBar()
|
||||||
|
if (!shelvingFk.isNullOrEmpty()){
|
||||||
|
splash_progress.visibility = View.VISIBLE
|
||||||
|
toolbar_title.text = shelvingFk
|
||||||
|
viewModel.itemShelvingList(user,password,shelvingFk)
|
||||||
|
}
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setToolBar(){
|
||||||
|
val listIcons:ArrayList<Drawable> = ArrayList()
|
||||||
|
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_add_black_24dp,resources.newTheme())
|
||||||
|
listIcons.add(iconReload)
|
||||||
|
toolbar_icons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
|
||||||
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
|
if (item == iconReload){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
toolbar_icons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setEvents(){
|
||||||
|
backButton.setOnClickListener {
|
||||||
|
activity!!.onBackPressed()
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_matricula.requestFocus()
|
||||||
|
edit_matricula.setOnEditorActionListener { v, actionId, event ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
|
if (!edit_matricula.text.toString().isNullOrEmpty()){
|
||||||
|
toolbar_title.text = edit_matricula.text.toString()
|
||||||
|
splash_progress.visibility = View.VISIBLE
|
||||||
|
viewModel.itemShelvingList(user,password,edit_matricula.text.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_matricula.setText("")
|
||||||
|
(activity as MainActivity).hideKeyboard(edit_matricula)
|
||||||
|
return@setOnEditorActionListener true
|
||||||
|
}
|
||||||
|
|
||||||
|
return@setOnEditorActionListener false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun observeViewModel() {
|
||||||
|
with(viewModel){
|
||||||
|
loadShelvingList.observe(viewLifecycleOwner, Observer { event ->
|
||||||
|
event.getContentIfNotHandled().notNull {
|
||||||
|
splash_progress.visibility = View.GONE
|
||||||
|
adapter = UbicadorAdapter(it.list)
|
||||||
|
location_recyclerview.adapter = adapter
|
||||||
|
location_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.ubicador.fragment
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.Transformations
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import es.verdnatura.domain.GetShelvingParkingUserCase
|
||||||
|
import es.verdnatura.domain.GetUbicadorUserCase
|
||||||
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
|
import es.verdnatura.presentation.common.Event
|
||||||
|
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingListVO
|
||||||
|
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorListVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||||
|
import retrofit2.Call
|
||||||
|
import retrofit2.Callback
|
||||||
|
import retrofit2.Response
|
||||||
|
|
||||||
|
class UbicadorViewModel : BaseViewModel() {
|
||||||
|
|
||||||
|
|
||||||
|
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private val _shelvingList by lazy { MutableLiveData<ItemUbicadorListVO>() }
|
||||||
|
val shelvingList: LiveData<ItemUbicadorListVO>
|
||||||
|
get() = _shelvingList
|
||||||
|
|
||||||
|
|
||||||
|
val loadShelvingList = Transformations.map(_shelvingList) { Event(it) }
|
||||||
|
|
||||||
|
|
||||||
|
fun itemShelvingList(usuario:String,password:String,vShelvingFk:String){
|
||||||
|
getUbicadorUserCase.itemShelvingList(usuario,password,vShelvingFk.toUpperCase()).enqueue(object :
|
||||||
|
Callback<List<ItemUbicadorVO>> {
|
||||||
|
override fun onFailure(call: Call<List<ItemUbicadorVO>>, t: Throwable) {
|
||||||
|
val listError:ArrayList<ItemUbicadorVO> = ArrayList()
|
||||||
|
listError.add(ItemUbicadorVO(isError = true,errorMessage = t.message!!))
|
||||||
|
_shelvingList.value = ItemUbicadorListVO(listError)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResponse(
|
||||||
|
call: Call<List<ItemUbicadorVO>>,
|
||||||
|
response: Response<List<ItemUbicadorVO>>
|
||||||
|
) {
|
||||||
|
if (response.body() != null){
|
||||||
|
_shelvingList.value = response.body()?.let { ItemUbicadorListVO(it) }
|
||||||
|
}else{
|
||||||
|
val listError:ArrayList<ItemUbicadorVO> = ArrayList()
|
||||||
|
listError.add(ItemUbicadorVO(isError = true,errorMessage = "Error en la llamada de itemShelvingList"))
|
||||||
|
_shelvingList.value = ItemUbicadorListVO(listError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.ubicador.model
|
||||||
|
|
||||||
|
class ItemUbicadorVO (
|
||||||
|
var item:String = "",
|
||||||
|
var description:String = "",
|
||||||
|
var visible:String = "",
|
||||||
|
var stickers:String = "",
|
||||||
|
var packing:String = "",
|
||||||
|
var col:String = "",
|
||||||
|
var row:String = "",
|
||||||
|
var code:String = "",
|
||||||
|
var id:String = "",
|
||||||
|
var priority:String = "",
|
||||||
|
var isError:Boolean = false,
|
||||||
|
var errorMessage:String = ""
|
||||||
|
)
|
||||||
|
|
||||||
|
class ItemUbicadorListVO(
|
||||||
|
var list:List<ItemUbicadorVO> = listOf()
|
||||||
|
)
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M3,2v12h3v9l7,-12L9,11l4,-9L3,2zM19,2h-2l-3.2,9h1.9l0.7,-2h3.2l0.7,2h1.9L19,2zM16.85,7.65L18,4l1.15,3.65h-2.3z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M13,3L6,3v18h4v-6h3c3.31,0 6,-2.69 6,-6s-2.69,-6 -6,-6zM13.2,11L10,11L10,7h3.2c1.1,0 2,0.9 2,2s-0.9,2 -2,2z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
|
@ -13,7 +13,8 @@
|
||||||
<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"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -24,6 +25,15 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.6"
|
app:layout_constraintHorizontal_bias="0.6"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tool:listitem="@layout/item_pasilleros_main_menu"
|
||||||
|
android:paddingTop="@dimen/toolbar_height"/>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -23,46 +23,56 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:paddingTop="@dimen/toolbar_height">
|
android:paddingTop="@dimen/toolbar_height">
|
||||||
|
<LinearLayout
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/textinputlayout_username"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColorHint="@android:color/darker_gray">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/shelvingText"
|
android:id="@+id/textinputlayout_username"
|
||||||
style="@style/InputLineTextSearch"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:backgroundTint="@android:color/white"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Escanea shelving"
|
android:layout_weight="1"
|
||||||
android:inputType="text"
|
android:textColorHint="@android:color/darker_gray">
|
||||||
android:lines="1"
|
|
||||||
android:maxLines="1"
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:textColor="@color/verdnatura_white"
|
android:id="@+id/shelvingText"
|
||||||
android:textColorHint="@android:color/darker_gray" />
|
style="@style/InputLineTextSearch"
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
android:layout_width="match_parent"
|
||||||
|
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:hint="Escanea shelving"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textColorHint="@android:color/darker_gray" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/textinputlayout_dayrange"
|
android:id="@+id/textinputlayout_dayrange"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColorHint="@android:color/darker_gray">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/dayrange"
|
|
||||||
style="@style/InputLineTextSearch"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:backgroundTint="@android:color/white"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Day Range"
|
android:layout_weight="1"
|
||||||
android:inputType="number"
|
android:textColorHint="@android:color/darker_gray">
|
||||||
android:text="1"
|
|
||||||
android:lines="1"
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:maxLines="1"
|
android:id="@+id/dayrange"
|
||||||
android:textColor="@color/verdnatura_white"
|
style="@style/InputLineTextSearch"
|
||||||
android:textColorHint="@android:color/darker_gray" />
|
android:layout_width="match_parent"
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:hint="Day Range"
|
||||||
|
android:inputType="number"
|
||||||
|
android:text="1"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textColorHint="@android:color/darker_gray" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -100,7 +110,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Aoarcado"
|
android:text="Aparcado"
|
||||||
android:textSize="@dimen/body2"
|
android:textSize="@dimen/body2"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|
|
@ -0,0 +1,125 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:paddingTop="@dimen/toolbar_height">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/textinputlayout_matricula"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textColorHint="@android:color/darker_gray">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edit_matricula"
|
||||||
|
style="@style/InputLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:hint="Escanea matricula"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textColorHint="@android:color/darker_gray" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/options_image_width"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@drawable/ic_delete_forever_black_24dp"
|
||||||
|
android:padding="@dimen/options_image_padding"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/options_image_width"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@drawable/ic_mode_edit_black_24dp"
|
||||||
|
android:padding="@dimen/options_image_padding"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/options_image_width"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@drawable/ic_local_parking_black_24dp"
|
||||||
|
android:padding="@dimen/options_image_padding"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/options_image_width"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@drawable/ic_flash_auto_black_24dp"
|
||||||
|
android:padding="@dimen/options_image_padding"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/location_recyclerview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
tools:listitem="@layout/item_ubication_row"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tool="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO" />
|
||||||
|
</data>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/item_row_layout"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/verdnatura_black_5"
|
||||||
|
android:paddingLeft="@dimen/pasilleros_margin_main_menu"
|
||||||
|
android:paddingRight="@dimen/pasilleros_margin_main_menu"
|
||||||
|
android:paddingTop="@dimen/pasilleros_margin_main_menu"
|
||||||
|
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginRight="@dimen/layout_margin_min">
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="@dimen/item_image_width"
|
||||||
|
android:layout_height="@dimen/item_image_width"
|
||||||
|
app:cardCornerRadius="100dp"
|
||||||
|
android:layout_marginRight="@dimen/layout_margin_1">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_item"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
/>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/itemfk_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textSize="@dimen/h8"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:text="@{item.item}"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/longname_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textSize="@dimen/h8"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:text="@{item.description}"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/multi_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:text="6 x 15"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/visible_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/h6"
|
||||||
|
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||||
|
android:text="@{item.visible}"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/verdnatura_black_9"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
|
@ -70,6 +70,10 @@
|
||||||
<dimen name="pasilleros_margin_main_menu">15dp</dimen>
|
<dimen name="pasilleros_margin_main_menu">15dp</dimen>
|
||||||
<dimen name="itemcard_image_height">300dp</dimen>
|
<dimen name="itemcard_image_height">300dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="options_image_width">40dp</dimen>
|
||||||
|
<dimen name="options_image_padding">10dp</dimen>
|
||||||
|
<dimen name="item_image_width">40dp</dimen>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue