0

I have been working on some projects with kivy for a while, some of them requiring fullscreen, but now I want to learn kivymd. The problem is that my kivymd app opens in fullscreen, how can I change that from the code? Also, how can I change the default window size of the application?

3 Answers3

1

Set the window size BEFORE importing MD modules and BEFORE importing the kivy.core.window.Window module!

from kivy.config import Config
Config.set('graphics', 'width', '200')
Config.set('graphics', 'height', '200')

[impots MD modules]
[impots kivy.core.window.Window modules]
Xyanight
  • 1,315
  • 1
  • 7
  • 10
0

It is simple resizing the windows but note one thing while packing this for android apk you should remove these lines:

     from kivy.core.window import Window
     Window.size =[x ,y]

The x and y variables is upto your choice

Saffron-codes
  • 158
  • 1
  • 9
0

Add this lines at the top your code. change the values to adjust the size of your window to your desired size.

from kivy.core.window import Window
Window.size = (370, 700)
darkmatter08
  • 136
  • 1
  • 5