mirror of
https://github.com/markqvist/Sideband.git
synced 2025-08-06 05:24:17 -04:00
Updated kivymd
This commit is contained in:
parent
c6df8b851b
commit
abcf173cc8
160 changed files with 11617 additions and 6545 deletions
72
sbapp/kivymd/tests/test_textfield.py
Normal file
72
sbapp/kivymd/tests/test_textfield.py
Normal file
|
@ -0,0 +1,72 @@
|
|||
# from kivy.clock import Clock
|
||||
# from kivy.uix.textinput import TextInput
|
||||
|
||||
from kivymd.tests.base_test import BaseTest
|
||||
|
||||
|
||||
class TextFieldTest(BaseTest):
|
||||
def test_textfield_raw_app(self):
|
||||
from kivymd.uix.boxlayout import MDBoxLayout
|
||||
from kivymd.uix.button import MDFlatButton
|
||||
from kivymd.uix.screen import MDScreen
|
||||
from kivymd.uix.textfield import MDTextField
|
||||
|
||||
# def set_text():
|
||||
# for widget in self.screen.ids.box.children:
|
||||
# if issubclass(widget.__class__, TextInput):
|
||||
# widget.text = "Input text"
|
||||
|
||||
self.render(
|
||||
MDScreen(
|
||||
MDBoxLayout(
|
||||
MDTextField(
|
||||
hint_text="Label",
|
||||
helper_text="Error massage",
|
||||
mode="rectangle",
|
||||
max_text_length=5,
|
||||
),
|
||||
MDTextField(
|
||||
icon_left="git",
|
||||
hint_text="Label",
|
||||
helper_text="Error massage",
|
||||
mode="rectangle",
|
||||
),
|
||||
MDTextField(
|
||||
icon_left="git",
|
||||
hint_text="Label",
|
||||
helper_text="Error massage",
|
||||
mode="fill",
|
||||
),
|
||||
MDTextField(
|
||||
hint_text="Label",
|
||||
helper_text="Error massage",
|
||||
mode="fill",
|
||||
),
|
||||
MDTextField(
|
||||
hint_text="Label",
|
||||
helper_text="Error massage",
|
||||
),
|
||||
MDTextField(
|
||||
icon_left="git",
|
||||
hint_text="Label",
|
||||
helper_text="Error massage",
|
||||
),
|
||||
MDTextField(
|
||||
hint_text="Round mode",
|
||||
mode="round",
|
||||
max_text_length=15,
|
||||
helper_text="Massage",
|
||||
),
|
||||
MDFlatButton(
|
||||
text="SET TEXT",
|
||||
pos_hint={"center_x": 0.5},
|
||||
),
|
||||
id="box",
|
||||
orientation="vertical",
|
||||
spacing="20dp",
|
||||
adaptive_height=True,
|
||||
size_hint_x=0.8,
|
||||
pos_hint={"center_x": 0.5, "center_y": 0.5},
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue