You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Add about app
Doesn't look great but it's functional...
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "About",
|
||||
"publisher": "MicroPythonOS",
|
||||
"short_description": "Info about MicroPythonOS",
|
||||
"long_description": "Shows current MicroPythonOS version, MicroPython version, build date and other useful info..",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.helloworld/icons/com.micropythonos.about_0.0.1_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.helloworld/mpks/com.micropythonos.about_0.0.1.mpk",
|
||||
"fullname": "com.micropythonos.about",
|
||||
"version": "0.0.1",
|
||||
"category": "development",
|
||||
"activities": [
|
||||
{
|
||||
"entrypoint": "assets/about.py",
|
||||
"classname": "About",
|
||||
"intent_filters": [
|
||||
{
|
||||
"action": "main",
|
||||
"category": "launcher"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
from mpos.apps import Activity
|
||||
|
||||
import mpos.info
|
||||
import sys
|
||||
|
||||
class About(Activity):
|
||||
|
||||
def onCreate(self):
|
||||
screen = lv.obj()
|
||||
screen.set_style_border_width(0, 0)
|
||||
screen.set_flex_flow(lv.FLEX_FLOW.COLUMN)
|
||||
screen.set_style_pad_all(mpos.ui.pct_of_display_width(2), 0)
|
||||
label1 = lv.label(screen)
|
||||
label1.set_text(f"MicroPythonOS version: {mpos.info.CURRENT_OS_VERSION}")
|
||||
label2 = lv.label(screen)
|
||||
label2.set_text(f"sys.version: {sys.version}")
|
||||
label3 = lv.label(screen)
|
||||
label3.set_text(f"sys.implementation: {sys.implementation}")
|
||||
label4 = lv.label(screen)
|
||||
label4.set_text(f"sys.platform: {sys.platform}")
|
||||
self.setContentView(screen)
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Reference in New Issue
Block a user