
Kivy Cookbook
By :

The Carousel
widget is an advanced way to present pictures, which is already present in modern apps. This is because it permits to display a large number of pictures in a helpful way for when the user wants to search for a particular one. In this recipe, we will create an app with the Carousel widget where the user will navigate between three pictures. They will look like the following:
If you drag the image to the right, you will see this next image:
In order to start this recipe, it is necessary to have three different pictures in standard formats (that is, PNG or JPEG). We have to rename them as f0.png
, f1.png
, and f2.png
, or with the .jpg
extension if it is appropriate.
To complete this recipe, we will use just a Python file where we will call the Carousel widget and set it up to display our pictures. Follow these steps:
kivy
packages.Factory
package.Carousel
widget.widget
class.Change the font size
Change margin width
Change background colour