user12938430
user12938430

Reputation:

Disable fullscreen kivymd

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?

Upvotes: 0

Views: 393

Answers (3)

darkmatter08
darkmatter08

Reputation: 136

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)

Upvotes: 0

Saffron-codes
Saffron-codes

Reputation: 188

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

Upvotes: 0

Xyanight
Xyanight

Reputation: 1325

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]

Upvotes: 1

Related Questions