[Python] Kivy and RecycleView

Discussão em 'Python' iniciado por Stack, Março 1, 2025.

  1. Stack

    Stack Membro Participativo

    class SimpleRecycleView(RecycleView):

    def __init__(self, **kwargs):
    super(SimpleRecycleView, self).__init__(**kwargs)

    self.viewclass = 'Label'

    self.layout_manager = RecycleBoxLayout(
    orientation='vertical',
    default_size=(None, 56),
    default_size_hint=(1, None),
    size_hint_y=None
    )

    self.add_widget(self.layout_manager)

    self.data = [{"text": f"Something {i}"} for i in range(1, 11)]

    class MainApp(App):
    def build(self):
    return SimpleRecycleView()

    if __name__ == "__main__":
    MainApp().run()


    In theory this is good. there is no error. but it does not have data on window. Where am I going wrong????

    Continue reading...

Compartilhe esta Página