Created
May 9, 2019 01:02
-
-
Save el3/136c2b58050063147b37f77121249dd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.recycleview import RecycleView | |
Builder.load_string(''' | |
<RV>: | |
viewclass: 'Label' | |
RecycleBoxLayout: | |
default_size: None, dp(56) | |
default_size_hint: 1, None | |
size_hint_y: None | |
height: self.minimum_height | |
orientation: 'vertical' | |
''') | |
class RV(RecycleView): | |
def __init__(self, **kwargs): | |
super(RV, self).__init__(**kwargs) | |
self.data = [{'text': str(x)} for x in range(100)] | |
class TestApp(App): | |
def build(self): | |
return RV() | |
if __name__ == '__main__': | |
TestApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment