I would like to know where can I see and use the parameters given on the data during the creation of the widgets.
Problem: it looks like __init__
doesn't have the information so the call has to be after so I would like to know when to be able to use my custom paramaters.
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.recycleview import RecycleView
from kivy.factory import Factory as F
Builder.load_string('''
<RV>:
viewclass: 'CustomLabel'
RecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
''')
class CustomLabel(F.Label):
def __init__(self, **kwargs):
super().__init__(**kwargs)
print(kwargs, "why can't I see the stuff from data ???")
class RV(RecycleView):
def __init__(self, **kwargs):
super(RV, self).__init__(**kwargs)
self.data = [{'text': str(x), "new_parameter":"idk where am I"} for x in range(100)]
class TestApp(App):
def build(self):
return RV()
if __name__ == '__main__':
TestApp().run()