Kivy — it is a platform independent GUI tool in Python. Since it can run on Android, IOS, Linux, Windows, etc. It is mainly used to develop Android application, but that does not mean that it cannot be used in desktop applications.
PageLayout works differently from other layouts. It is a dynamic layout in the sense that it allows you to flip through pages using its borders. The idea is that its components are located opposite each other, and we can only see the one that is on top.
PageLayout is like copy pages so that we can move / resize pages to the right or left.
PageLayout class is used to create a simple multi-page layout that makes it easy to switch from one page to another using a border.
To use PageLayout, you must import it with the following command:
from kivy.uix.pagelayout import PageLayout
Currently PageLayout does not respect the size_hint, size_hint_min, size_hint_max or pos_hint properties. This means we cannot use all of this in the page layout.
PageLayout: Button: text: `page1` Button: text: `page2` Button: text:` page3`
Transitions from one page to another are carried out by scrolling from the borders of the area to the right or to the left. If you want to use multiple widgets on a page, use layouts for that. Ideally, each page should consist of a single layout widget that contains the remaining widgets on that page.
The page layout contains many things you can use to make it more efficient in a
.kv file .
A basic approach to creating a page layout using a .kv file
1) import kivy 2) import kivyApp 3) import Pagelayout 4) Set minimum version (optional) 5) create Layout class 6) create App class - create build () function 7) Set up .kv file (name same as the App class) 8) return Layout / widget / Class (according to requirement) 9) Run an instance of the class
1). kv file is just Simply how to create pages in .kv file
2). kv file is how can yo add features like: color, text, image, canvas, swipe_threshold, button in the pages.
Implementing the —
1 ) .kv simple page file