Created
January 16, 2021 21:43
-
-
Save tshirtman/46f81e623a01ecf5e6d3daa6564a5507 to your computer and use it in GitHub Desktop.
This file contains 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 | |
KV = ''' | |
BoxLayout: | |
orientation: 'vertical' | |
Spinner: | |
id: orientation | |
text: 'lr-tb' | |
values: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] | |
size_hint_y: None | |
height: dp(40) | |
RecycleView: | |
data: [{'text': f"cell {n}"} for n in range(100)] | |
viewclass: 'Label' | |
RecycleGridLayout: | |
cols: 3 | |
orientation: orientation.text or 'lr-tb' | |
default_size: 0, dp(56) | |
default_size_hint: 1, None | |
size_hint_y: None | |
spacing: dp(3) | |
height: self.minimum_height | |
''' # noqa | |
class Application(App): | |
def build(self): | |
return Builder.load_string(KV) | |
if __name__ == "__main__": | |
Application().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment