Skip to content

Commit fb23bfc

Browse files
Add about app
Doesn't look great but it's functional...
1 parent 7a5288b commit fb23bfc

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "About",
3+
"publisher": "MicroPythonOS",
4+
"short_description": "Info about MicroPythonOS",
5+
"long_description": "Shows current MicroPythonOS version, MicroPython version, build date and other useful info..",
6+
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.helloworld/icons/com.micropythonos.about_0.0.1_64x64.png",
7+
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.helloworld/mpks/com.micropythonos.about_0.0.1.mpk",
8+
"fullname": "com.micropythonos.about",
9+
"version": "0.0.1",
10+
"category": "development",
11+
"activities": [
12+
{
13+
"entrypoint": "assets/about.py",
14+
"classname": "About",
15+
"intent_filters": [
16+
{
17+
"action": "main",
18+
"category": "launcher"
19+
}
20+
]
21+
}
22+
]
23+
}
24+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from mpos.apps import Activity
2+
3+
import mpos.info
4+
import sys
5+
6+
class About(Activity):
7+
8+
def onCreate(self):
9+
screen = lv.obj()
10+
screen.set_style_border_width(0, 0)
11+
screen.set_flex_flow(lv.FLEX_FLOW.COLUMN)
12+
screen.set_style_pad_all(mpos.ui.pct_of_display_width(2), 0)
13+
label1 = lv.label(screen)
14+
label1.set_text(f"MicroPythonOS version: {mpos.info.CURRENT_OS_VERSION}")
15+
label2 = lv.label(screen)
16+
label2.set_text(f"sys.version: {sys.version}")
17+
label3 = lv.label(screen)
18+
label3.set_text(f"sys.implementation: {sys.implementation}")
19+
label4 = lv.label(screen)
20+
label4.set_text(f"sys.platform: {sys.platform}")
21+
self.setContentView(screen)
5.55 KB
Loading

0 commit comments

Comments
 (0)