Hey,
I'm fairly new to python, and very new to Kivy. I want to be able to do all the layout aspects of the App within the .kv file to avoid using the python file. However I can't find any good tutorials on this, this is what I have so far, by manipulating example codes:
#:kivy 1.5.1
<Home>:
canvas:
Color:
rgb: 0,0,.2
Rectangle:
size: self.size
FloatLayout:
Label:
font_size: 28
text:
('[b]Sports[/b] [color=00FF00]Cam[/color]')
markup: True
BoxLayout:
size_hint: .5, None
height: 150
pos_hint: {'center_x': .5}
orientation: 'vertical'
Button:
text: 'Camera Stream 1'
on_release: root.manager.current = 'Camera 1'
Button:
text: 'Camera Stream 2'
on_release: root.manager.current = 'Camera 2'
Button:
text: 'Record'
on_release: root.manager.current = 'Record Page'
Button:
text: 'Settings'
on_release: root.manager.current = 'Settings Page'
The sections i don't understand are the pos_hint and size_hint commands, for example iv been trying to get the Label: to be positioned at the top of the screen in the center above the buttons in the boxlayout. Iv looked at the info on the Kivy page but can't figure out how to do it. I know its probably very simple. If anyone could explain how to do this? or even know of a link which may help me understand how those commands can be used to arrange the GUI layout would be very useful!!!
Thanks, Sam