some tests with kivy
This commit is contained in:
54
immo.kv
Normal file
54
immo.kv
Normal file
@@ -0,0 +1,54 @@
|
||||
ImmoScreen:
|
||||
do_scroll_x: False
|
||||
do_scroll_y: False if root.fullscreen else (content.height > root.height - dp(16))
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: root.height if root.fullscreen else max(root.height, content.height)
|
||||
GridLayout:
|
||||
id: content
|
||||
cols: 1
|
||||
spacing: '8dp'
|
||||
padding: '8dp'
|
||||
size_hint: (1, 1) if root.fullscreen else (.8, None)
|
||||
height: self.height if root.fullscreen else self.minimum_height
|
||||
|
||||
Label
|
||||
text: 'Hello'
|
||||
CTextInput:
|
||||
id: txt_input
|
||||
size_hint_y: None
|
||||
height: '32dp'
|
||||
text: '23'
|
||||
input_filter: 'float'
|
||||
focus: True
|
||||
on_text: app.on_text(args)
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button normal'
|
||||
|
||||
Label
|
||||
text: 'Hello'
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button down'
|
||||
state: 'down'
|
||||
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button disabled'
|
||||
disabled: True
|
||||
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button down disabled'
|
||||
state: 'down'
|
||||
disabled: True
|
||||
|
||||
<CTextInput@TextInput>
|
||||
on_focus:
|
||||
screen = self.parent.parent.parent.parent
|
||||
#if screen.parent: screen.focused = self
|
||||
Reference in New Issue
Block a user