class BlankPopup(DeferredModalView): content = ObjectProperty(None) _container = BoxLayout() def __init__(self, **kwargs): self.background_color = (0, 0, 0, 0.7) super(BlankPopup, self).__init__(**kwargs) self.bl = BoxLayout(orientation="vertical") self.anchor_y = "top" self.padding = 7 self.bl.add_widget(self._container) self.add_widget(self.bl) def on_content(self, instance, value): self._container.clear_widgets() self._container.add_widget(value)
def __init__(self, **kwargs): self.background_color = (0, 0, 0, 0.7) super(BlankPopup, self).__init__(**kwargs) self.bl = BoxLayout(orientation="vertical") self.anchor_y = "top" self.padding = 7 self.bl.add_widget(self._container) self.add_widget(self.bl)