You were not instancing or opening the ModalView. I have added a button the main Window that instances and opens the Modal view. Changes highlighted.
from kivy.app import App
from kivy.lang import Builder
from kivy.clock import Clock
import kivy.properties as P
from kivy.animation import Animation
from kivy.uix.widget import Widget
from kivy.uix.modalview import ModalView
KV =
'''
#:import Factory kivy.factory.Factory Button:
size_hint_y: None
height: 48
pos_hint: {'y': 0}
text: 'Open Modal View'
on_release: Factory.KivyModelView().open()
'''
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/e7f8b5ca-251b-407b-90ea-dc507605f7d4n%40googlegroups.com.
The link is to a code snippet, not the full code. Run to code I’ve sent, and ask me questions about what you don’t understand.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/e00d1806-611e-432c-86be-854ecb55e74bn%40googlegroups.com.
Lets do the experiments with the single file example. When you get that working, you can transfer it to your larger program. There is not enough context in the snippet, and your code base is big enough that I don’t want to invest the time to figure it out.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d7084621-8bee-461b-965a-21a598fd3fe8n%40googlegroups.com.
The info below looks fine – I don’t see any obvious problems.
Make the edits you want in that single file program, and lets see if you can get it doing what you want.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c90826f4-0ef1-4778-9011-62dca8bcace2n%40googlegroups.com.
Your kv code did not contain a root widget. Adding a BoxLayout as a root widget, and the modal view comes up:
import kivy.properties as P
from kivy.animation import Animation
from kivy.app import App
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.uix.modalview import ModalView
from kivy.uix.widget import Widget
KV = """
BoxLayout:
"""
from kivy.factory import Factory
class Application(App):
time = P.NumericProperty()
def on_start(self):
self.modelview = Factory.KivyModelView().open()
def build(self):
Clock.schedule_interval(self.update_time, 0)
return Builder.load_string(KV)
def update_time(self, dt):
self.time += dt
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/7c224db8-f93e-4aee-b3fe-03800580fc12n%40googlegroups.com.
Glad you got it figured out.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/ba16bf82-2fe7-4566-ba59-2afbc77ef847n%40googlegroups.com.
Looks like a spelling error:
self.modalview = Factory.LoadingModalView().open()
self.modelview.start_checking()
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/57a3bb99-f59d-4a37-8235-cbc3d0f58556n%40googlegroups.com.
Create a runnable example.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a2410304-35c7-43a7-9d58-76b039a81921n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/606dce7a.1c69fb81.a4479.54a9SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
On Apr 7, 2021, at 9:39 AM, VISHESH MANGLA <f201...@pilani.bits-pilani.ac.in> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CALG_zn7CGWvriWkwr6zdWg7r2yc0F%2BBgjMtMuNP%3DFmXVoZVVQw%40mail.gmail.com.