Commit 153f7c83 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Initial commit.

parents
.idea
*.pyc
*.pyo
*.apk
from kivy.app import App
from kivy.storage.jsonstore import JsonStore
__app_package__ = 'edu.unl.cse.soft161.note'
__app__ = 'Note App'
__version__ = '1.0'
__flags__ = ['--bootstrap=sdl2', '--requirements=python2,kivy', '--orientation=landscape']
class NoteApp(App):
def __init__(self, **kwargs):
super(NoteApp, self).__init__(**kwargs)
self.store = JsonStore('note.json')
def load_state(self):
try:
self.root.text = self.store['note']['text']
except KeyError:
pass
def save_state(self):
self.store['note'] = {'text': self.root.text}
def on_start(self):
self.load_state()
def on_pause(self):
self.save_state()
return True
def on_stop(self):
self.save_state()
if __name__ == '__main__':
app = NoteApp()
app.run()
TextInput:
multiline: True
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment