Add about app

Doesn't look great but it's functional...
This commit is contained in:
Thomas Farstrike
2025-06-30 21:55:45 +02:00
parent 7a5288b911
commit fb23bfcb15
3 changed files with 45 additions and 0 deletions
@@ -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)
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB