In many applications, a login system is applied. As a result of this, in a Kivy course, we believe that we should teach how to make a basic login system with Kivy. To achieve this, the code in following is written. After the login, the program connects to OpenWeatherMap with its API and gets a data from given coordinates in code. After getting data, it shows the temperature in the logged-in screen. There is also a screen that is shown if the username or password does not match.
In this example, we improved and reviewed the code we have written in the previous post. Screen, ScreenManager and Builder are also used in this example, too. The code is:
In this part of course, you will find how to make applications for desktop or mobile consisting of two or more different screens. There can be menus, tutorials, question-answer sessions or any other requirements that can be solved with multiple screens. We utilize ScreenManager shipped with kivy for this purpose.
In this example, a code changing background color of application according to slider position is written. In Kivy, color values are changing from 0 to 1 and as a result floating point numbers are used in order to give color value to canvas.