I have a problem with ScreenManager and Screen in kivy file. I want to have a ScreenManager in BoxLayout, and it work when I don't use .kv file. But when I use kivy file, ScreenManager with "ContentScreenManager" id stretches to full window and does't see the previous code, and I only see the "ok2" button.
I hope I have explained my problem well :)
Python File
from kivy.app import App
from kivy.lang.builder import Builder
builder = Builder.load_file("index.kv")
class mainApp(App):
def build(self):
return builder
if __name__ == '__main__':
mainApp().run()
.kv file
<Main>
ScreenManager:
id: MainScreensManager
Screen:
name: "MainScreen"
manager: 'MainScreensManager'
BoxLayout:
Label:
text: "ok"
Label:
text: "ok1"
BoxLayout:
ScreenManager:
id: ContentScreensManager
Screen:
name: "FilmsScreen"
manager: "ContentScreensManager"
BoxLayout:
Button:
text: "ok2"
Thanks for the help!