Skip to content

Commit 52ba282

Browse files
committed
kivymd
1 parent 9a9a843 commit 52ba282

File tree

704 files changed

+31788
-21297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

704 files changed

+31788
-21297
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
from kivymd.app import MDApp
3+
4+
class Demo(MDApp):
5+
6+
def build(self):
7+
return super().build()
8+

Kivy/helpers.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
username_input = """
2+
MDTextField:
3+
hint_text: "Enter username"
4+
helper_text: "or click on forgot username"
5+
helper_text_mode: "on_focus"
6+
icon_right: "android"
7+
icon_right_color: app.theme_cls.primary_color
8+
pos_hint:{'center_x': 0.5, 'center_y': 0.5}
9+
size_hint_x:None
10+
width:300
11+
"""

Kivy/main.py

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
11

2-
from kivy.app import App
2+
from kivymd.app import MDApp
3+
from kivymd.uix.screen import Screen
4+
from kivymd.uix.button import MDButton
5+
from kivymd.uix.textfield import MDTextField
6+
from kivy.lang import Builder
7+
from kivymd.uix.button import MDButton
8+
from kivymd.uix.button import MDButtonIcon
39

4-
class Demo(App):
10+
username_input = """
11+
MDTextField:
12+
hint_text: "Enter username"
13+
helper_text: "or click on forgot username"
14+
pos_hint:{'center_x': 0.5, 'center_y': 0.5}
15+
size_hint_x:None
16+
width:300
17+
"""
18+
19+
class TodoApp(MDApp):
520

621
def build(self):
7-
return super().build()
8-
9-
Demo().run()
22+
screen = Screen()
23+
24+
# user_name = MDTextField(text="Enter username", pos_hint={"center_x":0.5, "center_y":0.5},
25+
# size_hint_x=None, width=400)
26+
27+
username = Builder.load_string(username_input)
28+
button = MDButtonIcon(text="Click Me", pos_hint={"center_x":0.5, "center_y":0.5})
29+
30+
31+
32+
# screen.add_widget(username)
33+
screen.add_widget(button)
34+
35+
36+
return screen
37+
38+
TodoApp().run()
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)