Introduction
Kivy is a graphical user interface open-source Python library that enables you to create cross-platform apps on Windows, macOS, Android, iOS, Linux, and Raspberry Pi. It aids in the development of apps that make use of cutting-edge multi-touch user interfaces. Kivy's core concept is to allow developers to create an app once and deploy it across all devices, making code reusable and deployable and enabling quick and easy interaction design and fast prototyping.
The applications created using Kivy will look and feel the same across all platforms, but they will not have the same feel or look as native apps. It is mainly used to create Android applications, but it may also be used to develop desktop applications.
Let us see the various UX widgets provided by Kivy and their implementation.
UX Widgets
UX widgets are classical user interface widgets that are ready to be assembled to construct more complex widgets. Label, Button, CheckBox, Image, Slider, Progress Bar, Text Input, Toggle button, and Switch are some UX Widgets available. Classes for building and maintaining Widgets may be found in the kivy.uix module.
- Label: The Label widget is used to display text. It can handle both ASCII and Unicode strings.
- Button: A Button is a Label that has actions connected with it that are activated when the button is pressed (or released after a click/touch). The same settings are used to configure a button as they are for a label. When the button is clicked, it changes state, and we can also add properties or bind actions to it.
- CheckBox: A checkbox is a special type of two-state button that can be checked and unchecked.
- Image: A picture is displayed using the Image widget.
- Slider: The Slider widget has the appearance of a scrollbar. Horizontal and vertical orientations, min/max values, and default value are all supported by it.
- Progress Bar: The Progress Bar widget is used to show how far a task has progressed.
- TextInput: The TextInput widget is a plain text box that may be edited.
- Toggle Button: The ToggleButton widget is a checkbox that may be toggled on and off. The status toggles between 'normal' and 'down' when you touch or click it (as opposed to a Button, which is only 'down' for as long as it is pressed).
- Switch: As a mechanical light switch, the Switch widget can be active or inactive.
- Video: It is used to show video files or streams on the screen.