I am trying to add a dropdown list using kv file. I have managed to create it but when i click on it the drop down opens and closes immediately without me selecting or clicking anywhere
How do i stop this
Button:
id: btn
text: 'Press'
on_release:
if not root.state: dropdown.open(self); root.state = False
else: dropdown.dismiss(); root.state = False
size_hint: 0.2,0.05
height: '48dp'
DropDown:
id: dropdown
on_parent: self.dismiss()
on_select: btn.text = '{}'.format(args[1]); root.state = False
Button:
text: 'First Item'
size_hint_y: None
height: '48dp'
on_release: dropdown.select('First Item')
Label:
text: 'Second Item'
size_hint_y: None
height: '48dp'
Button:
text: 'Third Item'
size_hint_y: None
height: '48dp'
on_release: dropdown.select('Third Item')