Skip to content

Instantly share code, notes, and snippets.

@olymk2
Last active September 23, 2021 02:23
Show Gist options
  • Save olymk2/44326427d518d3c7d4db to your computer and use it in GitHub Desktop.
Save olymk2/44326427d518d3c7d4db to your computer and use it in GitHub Desktop.
kivy accoridan scroll view
from kivy.app import App
from kivy.lang import Builder
from kivy.config import Config
Config.set('graphics', 'width', '600')
Config.set('graphics', 'height', '400')
gui = """
#:kivy 1.0
BoxLayout:
ScrollView:
size_hint_x: None
Accordion
height: 500
id: testAccordian
orientation: 'vertical'
size_hint_y: None
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
AccordionItem
title: '123'
Button
title: 'but1'
Button
title: 'but2'
Button
title: 'but3'
Button
title: 'but4'
Button
title: 'but5'
"""
class test(App):
def build(self):
return Builder.load_string(gui)
if __name__ == '__main__':
test().run()
@lucent025
Copy link

Your code save me out òf stuck while making an androidapp. Thank youuuuuuuuuu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment