acceptable result for me is too comprehensive and simple. I have a better way:
- Set your photo in a specific box_layout field using "identifiers"
- You can change your photo dynamically
Kivy.kv (file)
<main_display>: BoxLayout: orientation: "vertical" Image: id: imageView source: '<random_name>.jpg' allow_stretch: True ....
Kivy.py (file)
class main_display(BoxLayout): def __init__(self, **kwargs): super(main_display,self).__init__()
Basically, set an arbitrary file name in the source attribute to kivy.kv (file). I tried to directly assign the "source" attribute from kivy.py (file), but failed with an approval error.
This is normal, in the Kivy.py file, remember to set the timetable once, as described above, and you can make changes to your photo. You can even add some Clock.schedule_interval(self.photo, 0.06) photos (dynamically) by changing the clock scheduler to Clock.schedule_interval(self.photo, 0.06) .
ENJOY!
Jason akon
source share