Using Carousel
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:
Getting ready
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.
How to do it…
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:
Import the usual
kivy
packages.Import the
Factory
package.Import the
Carousel
widget.Define the root
widget
class.In the
__init__...