Great images are key to making your apps look fantastic. 🎆🏔🖼 Let’s understand more about the ways in which images can appear in Glide.
Nearly all layout views in Glide have an image property, which displays an individual image for each list item. You can have different layout types for each tab in your app, so you can make the look & feel of images different on each page.
To display images in your app, Glide needs a link to an image file hosted online. E.g:
On list items, this is easy as Glide can host images that you drag and drop onto the image placeholders. But you may want to use your own image URLs. All you need is a shareable link to your online image that is public, so anyone can view it with the link.
Two of the easiest ways to host your own files online are with Google Drive & Dropbox.
Now you can connect the column with your image links to the Image property in Glide.
Whilst other components can also display images, the Image component is the most customizable and can present your images in lots of different ways.
To show the original image without cropping it, choose the Original setting in the Size dropdown.
To show smaller versions of this image, you can tweak the Size and Fill.
If you choose Fill the area and then reduce the size, Glide will crop your image with the following ratios:
If you choose Show the whole image and reduce the size, Glide will make the image smaller and inset it without cropping.
If you don’t want your image to go all the way to the edge of the screen, you can select Inset with content, rather than Edge to edge.
You can enable a tap to enlarge action on the image as well, to allow people to view the image full screen.
You can also display multiple images in one image component and trigger an image carousel.
To do this, name all of your image columns the same but with a number after each name and then number each column in sequence.
It doesn’t matter what you call each column, so long as each column has the same name and the next number. Glide will recognize all of the numbered columns and allow you to choose a single column with just that name (e.g. 'Image') which will incorporate all the columns and trigger the carousel. 👍🏽
Glide recognizes JPGs, PNGs, GIFs and SVGs.
For your app’s icon, it’s best to use a simple SVG. The app icon will appear in many places and at many sizes so it’s best to use a simple SVG icon which will scale and look good at any size.