Los carruseles no están disponibles en la última versión de Glide utilizando el editor de datos nativo de Glide. Cualquier solución probablemente no le dará la experiencia nativa de carrusel o deslizador que usted esperaría.
Los carruseles solían estar disponibles en las ya antiguas y clásicas aplicaciones. Estos carruseles se podían construir creando columnas de array sólo en Google Sheets. Una antigua explicación se puede encontrar aquí, aunque esta explicación será actualizada y eliminada en algún momento.
(Translated from English using DeepL)
Hello,
Carousels are not available in the newest version of Glide using Glide’s native data editor. Any workarounds will probably not give you the native carousel or slider experience you would expect.
Carousels used to be available in the now old and classic apps. These carousels could be built buy creating array columns in Google Sheets only. An old explanation can be found here, though this explanation will be updated and removed at some point.
Ideally you would have a separate table just for images, and then create a relation linking the restaurants table to the images table. The relation would be the source of the collection of cards.
OK. The first thing you need to do is open your relation configuration and check the box that says ‘Multiple’. This is because the relation should be finding multiple image rows.
If it’s appearing the same for each restaurant, then you are not using the relation as the source of your collection. Change the collection to use the relation instead of the table.
Glide does not provide a native carousel function in New Apps. What I’m giving you is an alternative workaround. It will require you to structure you data differently. Each image must have it’s own row. You cannot have images in multiple columns if you want my suggestion to work.
Hola @sergioclimente ! A ver si puedo echarte una mano… He creado 2 tablas para mostrarte cómo lo haría yo para mostrar un carrusel de imágenes en Glide.
Lo primero, he creado una tabla Restaurantes donde le he creado un campo Nombre y he creado 3 restaurantes de ejemplo.
Después he creado una tabla Imágenes con un campo Imagen y otro Restaurante y he creado 8 imágenes donde he asociado al Restaurante.01 tres imágenes, al Restaurante.02 otras 3 imágenes y al Restaurante.03 dos imágenes.
Después, he creado una relación entre los Restaurantes y las Imágenes por el campo Nombre de la tabla Restaurantes y el campo Restaurante de la tabla Imágenes y he marcado la casilla “Match multiple” porque un restaurante tiene varias imágenes.
Ahora viene la “magia”. Para mostrar un carrusel de imágenes he hecho lo siguiente. Lo primero, una pantalla con un componente collection para mostrar todos los restaurantes.
Al hacer clic en un restaurante, nos iremos a una pantalla de detalle del restaurante donde añadiremos un componente collection para mostrar las imágenes asociadas al Restaurante y para hacer un “swipe” lateral, configura el componente como te muestro en la captura.