1234567891011121314151617181920 |
- from kivy import platform
- __all__ = ('toast')
- _toast = None
- def _get_ref():
- global _toast
- if _toast is None:
- p = platform()
- if p == 'android':
- from androidtoast import toast
- else:
- from kivytoast import toast
- _toast = toast
- return _toast
- def toast(text, length_long=False):
- _get_ref()(text, length_long=length_long)
|