I need all the elements of my FirsWindow, put them in a recycleview. I'm thinking to do it from RecycleGridLayout instead of GridLayout, but I don't how to really apply it in the code. It's necesary that the GridLayout or RecycleGridLayout have cols:4, I think it's not necessary upload my py.file but I'm not sure. please I need help on this. thanks in advance.
kv.file
<FirstWindow>:
name: "Catalogue"
BoxLayout:
id: Boxmain
orientation: "vertical"
#size: root.width, root.height
#size_hint: 1, None
#height: 300
#padding: 50
spacing: 50
size: root.height, root.width
GridLayout:
cols: 4
padding: 4
Label:
text: "Items"
#font_size: 25
Label:
text: "Number"
Label:
text: "Price"
Label:
text: "Add to Cart"
Label:
text: "Tornillos"
text_size: self.size
halign: 'center'
valign: 'bottom'
Image:
id: image_tornillos
allow_stretch: True
keep_ratio: True
size_hint: 0.2,0.2
width: 60
height: 80
#pos_hint: {'center_x':1, 'center_y':1}
source: "images/tornillo.png"
center_x: self.parent.center_x
center_y: self.parent.center_y+10
TextInput:
id: input_tornillo
text: ""
halign: "right"
font_size: 18
multiline: True
#size_hint: (1, .15)
Label:
text: "0.0"
Button:
id: shopping1
#text: "Hello"
#font_size: 32
allow_stretch: True
keep_ratio: True
size_hint: .25,.30
pos_hint: {'center_x':0.5, 'center_y':0.5}
background_color: 0,0,0,0
#on_press: root.press_on()
#on_release: root.press_off()
on_press: root.ids.Shoppingcart1.source= root.var2
on_release: root.ids.Shoppingcart1.source= root.var1
Image:
id: Shoppingcart1
allow_stretch: True
keep_ratio: True
size_hint: 0.5,0.5
width: 60
height: 60
pos_hint: {'center_x':0.5, 'center_y':0.5}
source: root.var1
center_x: self.parent.center_x
center_y: self.parent.center_y
#------------------------
Button:
text:"lala"
Button:
text:"lal2"
Button:
text:"lale"
Button:
text:"lal5"
Button:
text:"lala"
Button:
text:"lal54"
Button:
text:"lala"
#------------------------------------------------------------
Related
I completed my code for main window which is the login page and I'm writing my code for the second page. Then, I tried to use the text field on my login screen and I can't type in it. However, before making my second window, the text field worked as expected and I can type in it. What could cause this issue?
Furthermore, I recieve an error (AttributeError: 'super' object has no attribute 'getattr'
) when I tried to press the clear button in main window.
Also, if you tried to run this code and see the second window, you will notice 3 MD cards not aligned properly if you don't expand the window to full size. if you have any idea how to fix it, please let me know.
SUMMARY OF WHAT I'M TRYING TO ACHIEVE HERE:
Figure out what why I can't use the textfield in main window
Fix the error when press the clear button
Align MD Cards properly
.py file
from kivy.lang import Builder
from kivymd.app import MDApp
from kivy.uix.screenmanager import ScreenManager, Screen
class MainWindow(Screen):
pass
class SecondWindow(Screen):
pass
class WindowManager(ScreenManager):
pass
class BaseApp(MDApp):
def build(self):
self.theme_cls.theme_style = "Light"
self.theme_cls.primary_palette = "Green"
return Builder.load_file("base.kv")
def clear(self):
self.root.ids.user.text = ""
self.root.ids.passw.text = ""
if __name__ == "__main__":
BaseApp().run()```
.kv file
# Filename: base.kv
#:kivy 2.1.0
#:include main.py
WindowManager:
MainWindow:
SecondWindow:
<MainWindow>:
name: "main"
Screen:
MDCard:
size_hint: None, None
size: 400, 500
pos_hint: {"center_x": 0.5, "center_y": 0.5}
elevation: 10
padding: 25
spacing: 25
orientation: "vertical"
MDLabel:
id: login_label
text: "WELCOME TO JAMES MADISON/n HIGH SCHOOL STUDENTS APP"
font_size: 22
font_name: "Raleway-Regular"
halign: "center"
size_hint_y: None
height: self.texture_size[1]
padding_y: 15
MDBoxLayout:
Image:
source: "jmhs.png"
size_hint_x: 1.15
halign: "center"
size_hint_y: 1.15
height: self.texture_size[1]
padding_y: 10
MDTextFieldRound:
id: user
hint_text: "Username"
icon_right: "account"
size_hint_x: None
width: 200
font_size: 18
font_name: "Roboto-Regular"
pos_hint: {"center_x": 0.5}
MDTextFieldRound:
id: passw
hint_text: "Password"
icon_right: "eye-off"
size_hint_x: None
width: 200
font_size: 18
font_name: "Roboto-Regular"
pos_hint: {"center_x": 0.5}
password: True
MDRoundFlatButton:
text: "LOG IN"
font_size: 12
font_name: "Raleway-Regular"
pos_hint: {"center_x": 0.5}
on_press:
app.root.current = "second"
root.manager.transition.direction = "left"
MDRoundFlatButton:
text: "CLEAR"
font_size: 12
font_name: "Raleway-Regular"
pos_hint: {"center_x": 0.5}
on_press: app.clear()
<SecondWindow>:
name: "second"
MDBoxLayout:
orientation: "horizontal"
MDBoxLayout:
size_hint: .225, 1
canvas.before:
Color:
rgba: 0, 0, 0, 0
Rectangle:
pos: self.pos
size: self.size
MDBoxLayout:
orientation: "vertical"
spacing: "10dp"
size_hint: 1, 1
canvas.before:
Color:
rgba: 227/255, 255/255, 226/255, 0.8
Rectangle:
pos: self.pos
size: self.size
MDBoxLayout:
spacing: "10dp"
size_hint: 1, .1
MDBoxLayout:
spacing: "10dp"
size_hint: 1, .9
canvas.before:
Color:
rgba: 227/255, 255/255, 226/255, 0.8
Rectangle:
pos: self.pos
size: self.size
MDGridLayout:
cols: 3
padding: 18
spacing: "20dp"
MDCard:
padding: 16
elevation: 0
border_radius: 20
radius: [15]
size_hint: None, None
size: "370dp", "140dp"
pos_hint: {"center_x": .5, "center_y": .5}
MDCard:
padding: 16
elevation: 0
border_radius: 20
radius: [15]
size_hint: None, None
size: "370dp", "140dp"
pos_hint: {"center_x": .5, "center_y": .5}
MDCard:
padding: 16
elevation: 0
border_radius: 20
radius: [15]
size_hint: None, None
size: "200dp", "140dp"
pos_hint: {"center_x": .5, "center_y": .5}
MDBoxLayout:
size_hint: .29, 1
canvas.before:
Color:
rgba: 0, 0, 0, 0
Rectangle:
pos: self.pos
size: self.size
I am currently experiencing an issue when trying to use a GridLayout with a ScrollView, in that the top half of the labels in the GridLayout are being cut off by the ScrollView.
For example, here is what it currently looks like:
And, here is the .kv code for this section (it is part of a BottomNavigation):
MDBottomNavigationItem:
id: hmNav
name: 'home'
text: 'Home'
icon: 'home'
GridLayout:
id: hmGrid
cols: 1
rows_minimum: {0: (self.parent.height) * 0.05, 1: (self.parent.height) * 0.2, 2: (self.parent.height) * 0.4, 3: (self.parent.height) * 0.1, 4: (self.parent.height) * 0.1}
row_force_default: True
MDLabel:
id: welcomeLabel
halign: 'center'
font_name: "DMSans"
text: "Hello, " + app.app.getId() + "!"
theme_text_color: "Custom"
font_size: '25sp'
size: self.texture_size
text_color: get_color_from_hex("#08421e")
MDLabel:
id: wLabel2
halign: 'center'
font_name: "DMSans"
text: "Here are your selected ingredients:"
theme_text_color: "Custom"
font_size: '15sp'
size: self.texture_size
text_color: get_color_from_hex("#08421e")
ScrollView:
id: selectedScroll
size: (self.parent.width, self.parent.height)
do_scroll_x: False
do_scroll_y: True
bar_width: 20
GridLayout:
id: selectedGrid
size_hint_y: None
spacing: 60
cols: 2
height: self.minimum_height
MDLabel:
halign: 'center'
text: "TEST1"
font_size: '15sp'
theme_text_color: "Custom"
text_color: get_color_from_hex("#08421e")
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST2"
font_size: '15sp'
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST1"
font_size: '15sp'
theme_text_color: "Custom"
text_color: get_color_from_hex("#08421e")
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST2"
font_size: '15sp'
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST1"
font_size: '15sp'
theme_text_color: "Custom"
text_color: get_color_from_hex("#08421e")
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST2"
font_size: '15sp'
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST 3"
font_size: '15sp'
size: self.texture_size
MDLabel:
halign: 'center'
text: "TEST 4"
font_size: '15sp'
size: self.texture_size
I have used a ScrollView with a BoxLayout successfully, using much of the same configuration as this GridLayout, but I'm unsure of why the top labels are being cut off in this particular instance.
Any help would be greatly appreciated!
Thanks.
When you use height: self.minimum_height in a GridLayout (and others), it calculates the height of the GridLayout based on the height of its children. This means that those children must have explicit height values. You have specified size: self.texture_size for each MDLabel, but that will have no effect if size_hint is left at the default of (1,1). To fix it, just add:
size_hint_y: None
to each of the MDLabels.
I am trying to align the Images to by Buttons so such that each image has a button placed down below. My current problem is that it does not align properly which I assume has to relate with my the columns specified within my GridLayout. Here is my code for my.kv:
<ScreenManagement>:
MenuScreen:
id: name
name: 'menu'
<MenuScreen>:
BoxLayout:
BoxLayout:
canvas:
Color:
rgba: 184/255, 200/255, 202/255, 1
Rectangle:
pos: self.pos
size: self.size
GridLayout:
cols: 3
rows: 4
BoxLayout:
orientation: 'horizontal'
spacing: 15
padding: 10
Image:
source: 'img/image1.jpg'
padding :10
size_hint_x: 0.2
allow_stretch: True
Image:
source: 'img/image2.jpg'
padding: 10
size_hint_x: 0.2
width: 2
allow_stretch: True
Image:
source: 'img/image3.jpg'
size_hint_x: 0.2
allow_stretch: True
Button:
size_hint_y: None
pos: (10,150)
size_hint: None, None
size: 250,50
spacing: 50
#padding: (0, 10, 0, 0)
text: 'button2image1'
on_press: self.background_color = 0,168/255,137/255,1
on_release:
root.manager.current = 'watermelon'
Button:
size_hint_y: None
pos: (275, 150)
size_hint: None, None
size: 250,50
spacing: 50
text: 'button2image2'
on_press: self.background_color = 0,168/255,137/255,1
on_release:
root.manager.current = 'galia'
Button:
size_hint_y: None
size: 250,50
size_hint: None, None
pos: (537.5, 150)
text: 'button2image3'
on_press: self.background_color = 0,168/255,137/255,1
on_release:
root.manager.current = 'cantaloupe'
I am currently building a mobile app with Python and KivyMD. On my application I have an MDExpansionPanel which is called in the on_pre_enter method of the ScreenManager. Naturally this will cause that every time I enter to the same page, the widget will be drawn once again.
Is there a way to delete the previous widget before drawing the new one? I've tried several approaches however I have had no success.
The code for a minimal reproducible example is the following:
Python code:
from kivy.properties import ObjectProperty
from kivy.uix.screenmanager import ScreenManager, Screen
from kivymd.app import MDApp
from kivymd.uix.expansionpanel import MDExpansionPanel, MDExpansionPanelOneLine
from kivy.uix.boxlayout import BoxLayout
class MyContentAliment(BoxLayout):
pass
class MyContentCasetas(BoxLayout):
pass
class MyContentGasolina(BoxLayout):
pass
class MyContentHosped(BoxLayout):
pass
class MyContentVarios(BoxLayout):
pass
class LoginWindow(Screen):
pass
class TravelManagerWindow(Screen):
panel_container = ObjectProperty(None)
# EXPANSION PANEL PARA SOLICITAR GV
def set_expansion_panel(self):
# FOOD PANEL
self.ids.panel_container.add_widget(MDExpansionPanel(icon="food", content=MyContentAliment(),
panel_cls=MDExpansionPanelOneLine(text="Alimentacion")))
# CASETAS PANEL
self.ids.panel_container.add_widget(MDExpansionPanel(icon="food", content=MyContentCasetas(),
panel_cls=MDExpansionPanelOneLine(text="Casetas")))
# GAS PANEL
self.ids.panel_container.add_widget(MDExpansionPanel(icon="food", content=MyContentGasolina(),
panel_cls=MDExpansionPanelOneLine(text="Gasolina")))
# HOSPEDAJE PANEL
self.ids.panel_container.add_widget(MDExpansionPanel(icon="food", content=MyContentHosped(),
panel_cls=MDExpansionPanelOneLine(text="Hospedaje")))
# VARIOS PANEL
self.ids.panel_container.add_widget(MDExpansionPanel(icon="food", content=MyContentVarios(),
panel_cls=MDExpansionPanelOneLine(text="Varios")))
### WINDOW MANAGER ################################
class WindowManager(ScreenManager):
pass
ScreenManager().add_widget(LoginWindow(name='login'))
ScreenManager().add_widget(TravelManagerWindow(name='travelManager'))
class reprodExample(MDApp):
def build(self):
self.theme_cls.primary_palette = "Teal"
return WindowManager()
if __name__ == "__main__":
reprodExample().run()
Kivy code:
:
LoginWindow:
TravelManagerWindow:
<LoginWindow>:
name: 'login'
MDRaisedButton:
text: 'Enter'
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
size_hint: None, None
on_release:
root.manager.transition.direction = 'up'
root.manager.current = 'travelManager'
<TravelManagerWindow>:
name:'travelManager'
on_pre_enter: root.set_expansion_panel()
MDRaisedButton:
text: 'Back'
pos_hint: {'center_x': 0.5, 'center_y': 0.85}
size_hint: None, None
on_release:
root.manager.transition.direction = 'down'
root.manager.current = 'login'
BoxLayout:
orientation: 'vertical'
size_hint:1,0.85
pos_hint: {"center_x": 0.5, "center_y":0.37}
adaptive_height:True
height: self.minimum_height
ScrollView:
adaptive_height:True
GridLayout:
size_hint_y: None
cols: 1
row_default_height: root.height*0.10
height: self.minimum_height
BoxLayout:
adaptive_height: True
orientation: 'horizontal'
GridLayout:
id: panel_container
size_hint_x: 0.6
cols: 1
adaptive_height: True
BoxLayout:
size_hint_x: 0.05
MDCard:
id: resumen_solicitud
size_hint: None, None
size: "250dp", "300dp"
pos_hint: {"top": 0.9, "center_x": .5}
elevation: 0.1
MDBoxLayout:
orientation: 'vertical'
canvas.before:
Color:
rgba: 0.8, 0.8, 0.8, 1
Rectangle:
pos: self.pos
size: self.size
MDLabel:
text: 'Monto Total Solicitado'
font_style: 'Button'
halign: 'center'
font_size: (root.width**2 + root.height**2) / 15.5**4
size_hint_y: 0.2
MDSeparator:
height: "1dp"
MDTextField:
id: suma_solic_viaje
text: "$ 0.00"
bold: True
line_color_normal: app.theme_cls.primary_color
halign: "center"
size_hint_x: 0.8
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
MDSeparator:
height: "1dp"
BoxLayout:
id: expense_graph
halign: 'center'
<MyContentAliment>:
adaptive_height: True
MDBoxLayout:
orientation:'horizontal'
adaptive_height:True
size_hint_x:self.width
pos_hint: {"center_x":0.5, "center_y":0.5}
spacing: dp(10)
padding_horizontal: dp(10)
MDLabel:
text: 'Monto:'
multiline: 'True'
halign: 'center'
pos_hint: {"x":0, "top":0.5}
size_hint_x: 0.15
font_style: 'Button'
font_size: 19
MDTextField:
id: monto_aliment_viaje
hint_text: 'Monto a solicitar'
pos_hint: {"x":0, "top":0.5}
halign: 'left'
size_hint_x: 0.3
helper_text: 'Ingresar el monto a solicitar'
helper_text_mode: 'on_focus'
write_tab: False
required: True
MDRaisedButton:
id: boton_aliment_viaje
pos_hint: {"x":0, "top":0.5}
text:'Ingresar Gasto'
### CASETAS
<MyContentCasetas>:
adaptive_height: True
MDBoxLayout:
orientation:'horizontal'
adaptive_height:True
size_hint_x:self.width
pos_hint: {"center_x":0.5, "center_y":0.5}
spacing: dp(10)
padding_horizontal: dp(10)
MDLabel:
text: 'Monto:'
multiline: 'True'
halign: 'center'
pos_hint: {"x":0, "top":0.5}
size_hint_x: 0.15
font_style: 'Button'
font_size: 19
MDTextField:
id: monto_casetas_viaje
hint_text: 'Monto a solicitar'
pos_hint: {"x":0, "top":0.5}
halign: 'left'
size_hint_x: 0.3
helper_text: 'Ingresar el monto a solicitar'
helper_text_mode: 'on_focus'
write_tab: False
input_filter: 'float'
required: True
MDRaisedButton:
id: boton_casetas_viaje
pos_hint: {"x":0, "top":0.5}
text:'Ingresar Gasto'
BoxLayout:
size_hint_x: 0.05
### GASOLINA
<MyContentGasolina>:
adaptive_height: True
MDBoxLayout:
orientation:'horizontal'
adaptive_height:True
size_hint_x:self.width
pos_hint: {"center_x":0.5, "center_y":0.5}
spacing: dp(10)
padding_horizontal: dp(10)
MDLabel:
text: 'Monto:'
multiline: 'True'
halign: 'center'
pos_hint: {"x":0, "top":0.5}
size_hint_x: 0.15
font_style: 'Button'
font_size: 19
MDTextField:
id: monto_gas_viaje
hint_text: 'Monto a solicitar'
pos_hint: {"x":0, "top":0.5}
halign: 'left'
size_hint_x: 0.3
helper_text: 'Ingresar el monto a solicitar'
helper_text_mode: 'on_focus'
write_tab: False
input_filter: 'float'
required: True
MDRaisedButton:
id: boton_gas_viaje
pos_hint: {"x":0, "top":0.5}
text:'Ingresar Gasto'
BoxLayout:
size_hint_x: 0.05
Thanks a lot in advance.
I am sorry if some parts are in my language hopefully it doesn't matter
When I press the 'Add' button to add another 3 textinputs like those up the 'Add' button and I want to save the input that is put on those textinput boxes but I think I can figure that myself.
I searched but couldn't find something useful. Also this is my first time creating something in this level so sorry if it is inefficient in some ways.
This is the py file:
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.properties import ObjectProperty
class MyGrid(GridLayout) :
id_1 = ObjectProperty(None)
id_2 = ObjectProperty(None)
id_3 = ObjectProperty(None)
id_4 = ObjectProperty(None)
id_10 =ObjectProperty(None)
def perfundo (self) :
file = open('F:\\F\\F\\' + self.id_1.text + '-' + str(date.today()) + '.txt', 'x')
file.write('Emri dhe mbiemri :' + self.id_1.text + '\n' + 'Lloji i vetures :' + self.id_2.text + '\n' + 'Nr. i telefonit :' + self.id_3.text + '\n' + 'Problemi :' + self.id_4.text)
file.close()
def add(self):
self.id_10.text
class HAZApp(App) :
def build (self) :
return MyGrid()
app = HAZApp()
app.run()
and this is the kv file
<MyGrid>
id: HAZ
id_1: emridhembiemri
id_2:llojiivetures
id_3:numriitelefonit
id_4:problemi
id_10:add
rows: 10
padding: 10
spacing: 10
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'photo.jpg'
BoxLayout:
canvas.before:
Color:
rgba: 0.4,0.5,0.8,1
Rectangle:
size: self.size
pos: self.pos
Label:
font_size: '40sp'
outline_color: 0, 0, 0
outline_width: 2
text: 'Auto Servis "Haziri"'
BoxLayout:
spacing:10
Label:
text:"Name"
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:"Type of car"
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:"Phone number"
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:"Problem"
font_size: 20
color:0.4,0.5,0.8,1
BoxLayout:
spacing:20
TextInput:
font_size: 20
id:emridhembiemri
TextInput:
font_size: 20
id:llojiivetures
TextInput:
font_size: 20
id:numriitelefonit
TextInput:
font_size: 20
id:problemi
BoxLayout:
spacing: 20
column:2
Label:
text:'Parts'
font_size: 20
color:0.4,0.5,0.8,1
BoxLayout:
Label:
text:'price for parts'
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:'price for work'
font_size: 20
color:0.4,0.5,0.8,1
BoxLayout:
spacing: 20
column:2
TextInput:
BoxLayout:
TextInput:
TextInput:
BoxLayout:
Button:
id:add
text:'Add'
on_press:root.add()
BoxLayout:
column:4
Label:
text:''
Label:
text:''
Label:
text:''
Label:
text:'Total'
BoxLayout:
column:4
Label:
text:''
Label:
text:''
Label:
text:''
Button:
text:'total'
BoxLayout:
Label:
text:''
Button:
text:'Finish'
font_size: 20
on_press:root.perfundo()
on_press: app.stop()
Label:
text:''
I recommend using a ScrollView to contain the TextInputs. Your add() method can be:
def add(self):
# Add a new PartsTextInputs inside the ScrollView
self.ids.parts_text_inputs.add_widget(Factory.PartsTextInputs())
Then add a rule for the PartsTextInputs in the kv as well as a ScrollView to contain them. Here is what a modified kv would look like:
<PartsTextInputs#BoxLayout>: # this is a rule for building the parts TextInputs
size_hint_y: None
height: self.minimum_height
spacing: 20
TextInput:
size_hint_y: None
height: 48
BoxLayout:
size_hint_y: None
height: self.minimum_height
TextInput:
size_hint_y: None
height: 48
TextInput:
size_hint_y: None
height: 48
<MyGrid>
id: HAZ
id_1: emridhembiemri
id_2:llojiivetures
id_3:numriitelefonit
id_4:problemi
id_10:add
# rows: 10
cols: 1
padding: 10
spacing: 10
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'photo.jpg'
BoxLayout:
canvas.before:
Color:
rgba: 0.4,0.5,0.8,1
Rectangle:
size: self.size
pos: self.pos
Label:
font_size: '40sp'
outline_color: 0, 0, 0
outline_width: 2
text: 'Auto Servis "Haziri"'
BoxLayout:
spacing:10
Label:
text:"Name"
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:"Type of car"
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:"Phone number"
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:"Problem"
font_size: 20
color:0.4,0.5,0.8,1
BoxLayout:
spacing:20
TextInput:
font_size: 20
id:emridhembiemri
TextInput:
font_size: 20
id:llojiivetures
TextInput:
font_size: 20
id:numriitelefonit
TextInput:
font_size: 20
id:problemi
BoxLayout:
spacing: 20
column:2
Label:
text:'Parts'
font_size: 20
color:0.4,0.5,0.8,1
BoxLayout:
Label:
text:'price for parts'
font_size: 20
color:0.4,0.5,0.8,1
Label:
text:'price for work'
font_size: 20
color:0.4,0.5,0.8,1
ScrollView:
size_hint_y: 3 # Since this is part of a GridLayout space is assigned by size_hint ratios
BoxLayout:
id: parts_text_inputs # this will contain all the parts TextInputs
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
PartsTextInputs: # this is the first of the parts TextInputs
BoxLayout:
Button:
id:add
text:'Add'
on_press:root.add()
BoxLayout:
column:4
Label:
text:''
Label:
text:''
Label:
text:''
Label:
text:'Total'
BoxLayout:
column:4
Label:
text:''
Label:
text:''
Label:
text:''
Button:
text:'total'
BoxLayout:
Label:
text:''
Button:
text:'Finish'
font_size: 20
on_press:root.perfundo()
on_press: app.stop()
Label:
text:''