【发布时间】:2017-09-17 07:00:36
【问题描述】:
我在 floatlayout 上有两个按钮都有 on_press() 事件
Button:
id: button1
size_hint: .12,.12
pos_hint:{"center_x":.30,"center_y":.065}
on_press: root.speeak(textbox2.text)
Button:
id: button2
size_hint: .12,.12
#pos_hint:{"center_x":.50,"center_y":.065}
on_press: root.stop()
按钮背后的方法
def speeak(self,texts):
self.texts = texts
global speak
speak = wincl.Dispatch("SAPI.SpVoice")
speak.Speak(self.texts)
def stop(self,*args):
speak.Pause()
当我按下 button1 时,整个布局挂起并且停止按钮不起作用。有人对这个问题有任何想法
【问题讨论】:
标签: android python cross-platform kivy kivy-language