mirror of https://github.com/kivy/kivy.git
Examples:keyboard_listener.py change `request_keyboard` to be compatible
with current master
This commit is contained in:
parent
4395e1c9c3
commit
504345ccec
|
@ -4,12 +4,13 @@ kivy.require('1.0.8')
|
|||
from kivy.core.window import Window
|
||||
from kivy.uix.widget import Widget
|
||||
|
||||
|
||||
class MyKeyboardListener(Widget):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(MyKeyboardListener, self).__init__(**kwargs)
|
||||
self._keyboard = Window.request_keyboard(
|
||||
self._keyboard_closed, self)
|
||||
self._keyboard_closed, self, 'text')
|
||||
if self._keyboard.widget:
|
||||
# If it exists, this widget is a VKeyboard object which you can use
|
||||
# to change the keyboard layout.
|
||||
|
|
Loading…
Reference in New Issue